search for: nlmsg_len

Displaying 20 results from an estimated 25 matches for "nlmsg_len".

Did you mean: cmsg_len
2023 Jul 03
2
[Bug 1691] New: mnl_nlmsg_ok returns true on malformed/incomplete messages leading to potential runtime issues
...liogovea1993 at gmail.com Consider the following example: source: ``` #include <linux/netfilter.h> #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <libmnl/libmnl.h> int main(int argc, char** argv) { const struct nlmsghdr header = { .nlmsg_len = 0xFFFFFFFF, .nlmsg_type = 0x0000, .nlmsg_flags = 0x0000, .nlmsg_seq = 0x00000000, .nlmsg_pid = 0x00000000 }; assert(!mnl_nlmsg_ok(&header, sizeof(struct nlmsghdr))); return EXIT_SUCCESS; } ``` output: ``` parse-header: parse-header.c:19: main: As...
2006 Jul 25
3
problem in Route add using netlink
...;dstAddr); inet_aton("192.168.51.90", (struct in_addr *)&rinfo->gateWay); } int addAttr (struct nlmsghdr *nlhdr, int maxlen, int type, void *data, int alen) { struct rtattr *rta; int len = RTA_LENGTH(alen); if (NLMSG_ALIGN(nlhdr->nlmsg_len) + len > maxlen) return -1; rta = (struct rtattr*)((char *)nlhdr + NLMSG_ALIGN(nlhdr->nlmsg_len)); rta->rta_type = type; rta->rta_len = len; memcpy(RTA_DATA(rta), data, alen); nlhdr->nlmsg_len = NLMSG_ALIGN(nlhdr->nlmsg_len)...
2005 Mar 20
3
Adding dsmark qdisc fails
I''m trying to configure dsmark qdisc on 2.6.11.4 user mode linux and tc from iproute2-2.6.11-050314. I think I have some mismatch in my setup since adding dsmark qdisc fails *unless* I specify "set_tc_index" argument which I believe should be optional: # tc qdisc add dev eth1 handle 1:0 root dsmark indices 8 RTNETLINK answers: Invalid argument Mar 20 13:00:50 user user.debug
2012 Dec 10
0
[Bridge] [PATCH v5] iproute2: add mdb sub-command to bridge
...LOAD(attr); + for (i = RTA_DATA(attr); RTA_OK(i, rem); i = RTA_NEXT(i, rem)) { + e = RTA_DATA(i); + print_mdb_entry(f, ifindex, e); + } +} + +int print_mdb(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) +{ + FILE *fp = arg; + struct br_port_msg *r = NLMSG_DATA(n); + int len = n->nlmsg_len; + struct rtattr * tb[MDBA_MAX+1]; + + if (n->nlmsg_type != RTM_GETMDB) { + fprintf(stderr, "Not RTM_GETMDB: %08x %08x %08x\n", + n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags); + + return 0; + } + + len -= NLMSG_LENGTH(sizeof(*r)); + if (len < 0) { + fprintf(stderr, &qu...
2012 Dec 05
2
[Bridge] [PATCH net-next v3] bridge: export multicast database via netlink
V3: drop debugging printk's update selinux perm table as well V2: drop patch 1/2, export ifindex directly Redesign netlink attributes Improve netlink seq check Handle IPv6 addr as well This patch exports bridge multicast database via netlink message type RTM_GETMDB. Similar to fdb, but currently bridge-specific. We may need to support modify multicast database too
2012 Dec 07
3
[Bridge] [PATCH net-next v4] bridge: export multicast database via netlink
From: Cong Wang <amwang at redhat.com> V4: remove some useless #include some coding style fix V3: drop debugging printk's update selinux perm table as well V2: drop patch 1/2, export ifindex directly Redesign netlink attributes Improve netlink seq check Handle IPv6 addr as well This patch exports bridge multicast database via netlink message type RTM_GETMDB.
2012 Nov 27
3
[Bridge] [RFC PATCH 1/2] bridge: export port_no and port_id via IFA_INFO_DATA
Based on net-next. This patch exports port->port_no port->port_id in the end of IFA_INFO_DATA. Cc: Herbert Xu <herbert at gondor.apana.org.au> Cc: Stephen Hemminger <shemminger at vyatta.com> Cc: "David S. Miller" <davem at davemloft.net> Cc: Thomas Graf <tgraf at suug.ch> Cc: Jesper Dangaard Brouer <brouer at redhat.com> Signed-off-by: Cong Wang
2006 Feb 03
4
[Bug 404] Packets stuck in netfilter_queue after heavy loading
https://bugzilla.netfilter.org/bugzilla/show_bug.cgi?id=404 ------- Additional Comments From dave@rem.homeip.net 2006-02-03 20:29 MET ------- Created an attachment (id=205) --> (https://bugzilla.netfilter.org/bugzilla/attachment.cgi?id=205&action=view) Description of "stuck packets", observations Still don't know WHY packets get stuck... -- Configure bugmail:
2005 Sep 30
4
[ANNOUNCE] iproute2 version (050929)
There is an new minor update to iproute2 utilities available: http://developer.osdl.org/dev/iproute2/download/iproute2-050929.tar.gz Also, this (and future) releases are now signed, for key info read: http://developer.osdl.org/dev/iproute2/signature.html [Stephen Hemminger] Fix uninitialized memory and leaks Add -batch option to ip. Update to 2.6.14 headers [Arnaldo] Integrate
2010 Dec 07
0
[PATCH]: A daemon to support HyperV KVP functionality
...sghdr *nlh; + unsigned int size; + struct msghdr message; + char buffer[64]; + struct iovec iov[2]; + + size = NLMSG_SPACE(sizeof(struct cn_msg) + msg->len); + + nlh = (struct nlmsghdr *)buffer; + nlh->nlmsg_seq = 0; + nlh->nlmsg_pid = getpid(); + nlh->nlmsg_type = NLMSG_DONE; + nlh->nlmsg_len = NLMSG_LENGTH(size - sizeof(*nlh)); + nlh->nlmsg_flags = 0; + + iov[0].iov_base = nlh; + iov[0].iov_len = sizeof(*nlh); + + iov[1].iov_base = msg; + iov[1].iov_len = size; + + memset(&message, 0, sizeof(message)); + message.msg_name = &addr; + message.msg_namelen = sizeof(addr); + messa...
2010 Dec 07
0
[PATCH]: A daemon to support HyperV KVP functionality
...sghdr *nlh; + unsigned int size; + struct msghdr message; + char buffer[64]; + struct iovec iov[2]; + + size = NLMSG_SPACE(sizeof(struct cn_msg) + msg->len); + + nlh = (struct nlmsghdr *)buffer; + nlh->nlmsg_seq = 0; + nlh->nlmsg_pid = getpid(); + nlh->nlmsg_type = NLMSG_DONE; + nlh->nlmsg_len = NLMSG_LENGTH(size - sizeof(*nlh)); + nlh->nlmsg_flags = 0; + + iov[0].iov_base = nlh; + iov[0].iov_len = sizeof(*nlh); + + iov[1].iov_base = msg; + iov[1].iov_len = size; + + memset(&message, 0, sizeof(message)); + message.msg_name = &addr; + message.msg_namelen = sizeof(addr); + messa...
2010 Dec 08
0
No subject
...; + unsigned int size; + struct msghdr message; + char buffer[64]; + struct iovec iov[2]; + + size =3D NLMSG_SPACE(sizeof(struct cn_msg) + msg->len); + + nlh =3D (struct nlmsghdr *)buffer; + nlh->nlmsg_seq =3D 0; + nlh->nlmsg_pid =3D getpid(); + nlh->nlmsg_type =3D NLMSG_DONE; + nlh->nlmsg_len =3D NLMSG_LENGTH(size - sizeof(*nlh)); + nlh->nlmsg_flags =3D 0; + + iov[0].iov_base =3D nlh; + iov[0].iov_len =3D sizeof(*nlh); + + iov[1].iov_base =3D msg; + iov[1].iov_len =3D size; + + memset(&message, 0, sizeof(message)); + message.msg_name =3D &addr; + message.msg_namelen =3D sizeo...
2010 Dec 08
0
No subject
...; + unsigned int size; + struct msghdr message; + char buffer[64]; + struct iovec iov[2]; + + size =3D NLMSG_SPACE(sizeof(struct cn_msg) + msg->len); + + nlh =3D (struct nlmsghdr *)buffer; + nlh->nlmsg_seq =3D 0; + nlh->nlmsg_pid =3D getpid(); + nlh->nlmsg_type =3D NLMSG_DONE; + nlh->nlmsg_len =3D NLMSG_LENGTH(size - sizeof(*nlh)); + nlh->nlmsg_flags =3D 0; + + iov[0].iov_base =3D nlh; + iov[0].iov_len =3D sizeof(*nlh); + + iov[1].iov_base =3D msg; + iov[1].iov_len =3D size; + + memset(&message, 0, sizeof(message)); + message.msg_name =3D &addr; + message.msg_namelen =3D sizeo...
2010 Dec 17
0
[PATCH 4/4] Staging: hv: Add a user-space daemon to support key/value pair (KVP)
...sghdr *nlh; + unsigned int size; + struct msghdr message; + char buffer[64]; + struct iovec iov[2]; + + size = NLMSG_SPACE(sizeof(struct cn_msg) + msg->len); + + nlh = (struct nlmsghdr *)buffer; + nlh->nlmsg_seq = 0; + nlh->nlmsg_pid = getpid(); + nlh->nlmsg_type = NLMSG_DONE; + nlh->nlmsg_len = NLMSG_LENGTH(size - sizeof(*nlh)); + nlh->nlmsg_flags = 0; + + iov[0].iov_base = nlh; + iov[0].iov_len = sizeof(*nlh); + + iov[1].iov_base = msg; + iov[1].iov_len = size; + + memset(&message, 0, sizeof(message)); + message.msg_name = &addr; + message.msg_namelen = sizeof(addr); + messa...
2010 Dec 17
0
[PATCH 4/4] Staging: hv: Add a user-space daemon to support key/value pair (KVP)
...sghdr *nlh; + unsigned int size; + struct msghdr message; + char buffer[64]; + struct iovec iov[2]; + + size = NLMSG_SPACE(sizeof(struct cn_msg) + msg->len); + + nlh = (struct nlmsghdr *)buffer; + nlh->nlmsg_seq = 0; + nlh->nlmsg_pid = getpid(); + nlh->nlmsg_type = NLMSG_DONE; + nlh->nlmsg_len = NLMSG_LENGTH(size - sizeof(*nlh)); + nlh->nlmsg_flags = 0; + + iov[0].iov_base = nlh; + iov[0].iov_len = sizeof(*nlh); + + iov[1].iov_base = msg; + iov[1].iov_len = size; + + memset(&message, 0, sizeof(message)); + message.msg_name = &addr; + message.msg_namelen = sizeof(addr); + messa...
2010 Nov 08
18
implementation of IEEE 802.1Qbg in lldpad
Hi, this set of patches contains the initial implementation of the IEEE 802.1Qbg standard: code for the exchange of EVB TLVs in LLDP frames to negotiate VSI capabalities as well as VDP VSI TLVs between a host with virtual machines and an adjacent switch. It supports setting the parameters of the TLV exchange from the command line using lldptool. VDP profiles consisting of
2010 Nov 08
18
implementation of IEEE 802.1Qbg in lldpad
Hi, this set of patches contains the initial implementation of the IEEE 802.1Qbg standard: code for the exchange of EVB TLVs in LLDP frames to negotiate VSI capabalities as well as VDP VSI TLVs between a host with virtual machines and an adjacent switch. It supports setting the parameters of the TLV exchange from the command line using lldptool. VDP profiles consisting of
2010 Sep 28
19
implementation of IEEE 802.1Qbg in lldpad
Hi, this set of patches contains the initial implementation of the IEEE 802.1Qbg standard: code for the exchange of EVB TLVs in LLDP frames to negotiate VSI capabalities as well as VDP VSI TLVs between a host with virtual machines and an adjacent switch. It supports setting the parameters of the TLV exchange from the command line using lldptool. VDP profiles consisting of
2010 Sep 28
19
implementation of IEEE 802.1Qbg in lldpad
Hi, this set of patches contains the initial implementation of the IEEE 802.1Qbg standard: code for the exchange of EVB TLVs in LLDP frames to negotiate VSI capabalities as well as VDP VSI TLVs between a host with virtual machines and an adjacent switch. It supports setting the parameters of the TLV exchange from the command line using lldptool. VDP profiles consisting of
2010 Jul 23
19
implementation of IEEE 802.1Qbg in lldpad
Hi, This set of patches contains the initial implementation of the IEEE 802.1Qbg standard: code for the exchange of EVB TLVs in LLDP frames to negotiate VSI capabalities as well as VDP VSI TLVs between a host with virtual machines and an adjacent switch. It supports setting the parameters of the TLV exchange from the command line using lldptool. VDP profiles consisting of