search for: nlh

Displaying 20 results from an estimated 58 matches for "nlh".

Did you mean: nl
2023 Jul 03
2
[Bug 1691] New: mnl_nlmsg_ok returns true on malformed/incomplete messages leading to potential runtime issues
...y that a message will have that "nlmsg_len" in the header, but this report assumes that such bytes are possible while parsing, and a parser using libmnl must correctly identify any incomplete messages. Looking at the source code ``` EXPORT_SYMBOL bool mnl_nlmsg_ok(const struct nlmsghdr *nlh, int len) { return len >= (int)sizeof(struct nlmsghdr) && nlh->nlmsg_len >= sizeof(struct nlmsghdr) && (int)nlh->nlmsg_len <= len; } ``` The last line casts "nlh->nlmsg_len" to "int", but that value can't be stored...
2012 Dec 07
3
[Bridge] [PATCH net-next v4] bridge: export multicast database via netlink
...skip: + idx++; + } + } + +out: + cb->args[1] = idx; + cb->args[2] = mdb->seq; + nla_nest_end(skb, nest); + return err; +} + +static int br_mdb_dump(struct sk_buff *skb, struct netlink_callback *cb) +{ + struct net_device *dev; + struct net *net = sock_net(skb->sk); + struct nlmsghdr *nlh; + int idx = 0, s_idx; + + s_idx = cb->args[0]; + + rcu_read_lock(); + + for_each_netdev_rcu(net, dev) { + if (dev->priv_flags & IFF_EBRIDGE) { + struct br_port_msg *bpm; + + if (idx < s_idx) + goto skip; + + nlh = nlmsg_put(skb, NETLINK_CB(cb->skb).portid, + cb->nl...
2014 Jul 17
1
[Bug 967] New: segfault when adding large sets
...entry=0x7fffffffe440, msgs=msgs at entry=0x7fffffffe430) at src/main.c:227 #10 0x0000000000405fca in main (argc=3, argv=<optimized out>) at src/main.c:340 # Loading a larger ruleset containing two ~1700-element sets: Program received signal SIGSEGV, Segmentation fault. mnl_attr_nest_start (nlh=nlh at entry=0x7fffffffd150, type=type at entry=1) at attr.c:535 535 start->nla_type = NLA_F_NESTED | type; (gdb) bt #0 mnl_attr_nest_start (nlh=nlh at entry=0x7fffffffd150, type=type at entry=1) at attr.c:535 #1 0x00007ffff7712f6d in nft_set_elem_nlmsg_build_payload (nlh=nlh at en...
2010 Dec 07
0
[PATCH]: A daemon to support HyperV KVP functionality
...nfo); + if (error != 0) { + strcpy(buffer, "getaddrinfo failed\n"); + error = 1; + goto get_domain_done; + } + strcpy(buffer, info->ai_canonname); +get_domain_done: + freeaddrinfo(info); + return error; +} + +static int +netlink_send(int fd, struct cn_msg *msg) +{ + struct nlmsghdr *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...
2010 Dec 07
0
[PATCH]: A daemon to support HyperV KVP functionality
...nfo); + if (error != 0) { + strcpy(buffer, "getaddrinfo failed\n"); + error = 1; + goto get_domain_done; + } + strcpy(buffer, info->ai_canonname); +get_domain_done: + freeaddrinfo(info); + return error; +} + +static int +netlink_send(int fd, struct cn_msg *msg) +{ + struct nlmsghdr *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...
2010 Dec 08
0
No subject
...; + if (error !=3D 0) { + strcpy(buffer, "getaddrinfo failed\n"); + error =3D 1; + goto get_domain_done; + } + strcpy(buffer, info->ai_canonname); +get_domain_done: + freeaddrinfo(info); + return error; +} + +static int +netlink_send(int fd, struct cn_msg *msg) +{ + struct nlmsghdr *nlh; + 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->...
2010 Dec 08
0
No subject
...; + if (error !=3D 0) { + strcpy(buffer, "getaddrinfo failed\n"); + error =3D 1; + goto get_domain_done; + } + strcpy(buffer, info->ai_canonname); +get_domain_done: + freeaddrinfo(info); + return error; +} + +static int +netlink_send(int fd, struct cn_msg *msg) +{ + struct nlmsghdr *nlh; + 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->...
2010 Dec 17
0
[PATCH 4/4] Staging: hv: Add a user-space daemon to support key/value pair (KVP)
...nfo); + if (error != 0) { + strcpy(buffer, "getaddrinfo failed\n"); + error = 1; + goto get_domain_done; + } + strcpy(buffer, info->ai_canonname); +get_domain_done: + freeaddrinfo(info); + return error; +} + +static int +netlink_send(int fd, struct cn_msg *msg) +{ + struct nlmsghdr *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...
2010 Dec 17
0
[PATCH 4/4] Staging: hv: Add a user-space daemon to support key/value pair (KVP)
...nfo); + if (error != 0) { + strcpy(buffer, "getaddrinfo failed\n"); + error = 1; + goto get_domain_done; + } + strcpy(buffer, info->ai_canonname); +get_domain_done: + freeaddrinfo(info); + return error; +} + +static int +netlink_send(int fd, struct cn_msg *msg) +{ + struct nlmsghdr *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...
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
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
2012 Dec 07
3
[Bridge] [PATCH net-next v5] bridge: export multicast database via netlink
...nla_nest_end(skb, nest2); + skip: + idx++; + } + } + +out: + cb->args[1] = idx; + nla_nest_end(skb, nest); + return err; +} + +static int br_mdb_dump(struct sk_buff *skb, struct netlink_callback *cb) +{ + struct net_device *dev; + struct net *net = sock_net(skb->sk); + struct nlmsghdr *nlh = NULL; + int idx = 0, s_idx; + + s_idx = cb->args[0]; + + rcu_read_lock(); + + /* TODO: in case of rehashing, we need to check + * consistency for dumping. + */ + cb->seq = net->dev_base_seq; + + for_each_netdev_rcu(net, dev) { + if (dev->priv_flags & IFF_EBRIDGE) { + struct b...
2023 Mar 13
1
[Bridge] [PATCH net-next 01/11] net: Add MDB net device operations
...t (*ndo_mdb_dump)(struct net_device *dev, struct sk_buff *skb, + * struct netlink_callback *cb); + * Dumps MDB entries from dev. The first argument (marker) in the netlink + * callback is used by core rtnetlink code. + * * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh, * u16 flags, struct netlink_ext_ack *extack) * int (*ndo_bridge_getlink)(struct sk_buff *skb, u32 pid, u32 seq, @@ -1569,6 +1580,16 @@ struct net_device_ops { const unsigned char *addr, u16 vid, u32 portid, u32 seq, struct netlink_ext_ack *extack);...
2020 Apr 09
5
[Bug 1418] New: segfaults when running nft --file foo.nft --echo
...=0x5555556115a0) at segtree.c:978 #11 0x00005555555abaff in nlr_for_each_set (nlr=nlr at entry=0x5555556ac190, cb=cb at entry=0x5555555ab9c0 <rule_map_decompose_cb>, cache=0x55555560c340, data=0x0) at monitor.c:193 #12 0x00005555555ac326 in netlink_events_rule_cb (monh=0x7fffffffcce0, type=6, nlh=0x7fffffffcda0) at monitor.c:517 #13 netlink_events_cb (nlh=nlh at entry=0x7fffffffcda0, data=data at entry=0x7fffffffcce0) at monitor.c:890 #14 0x00005555555ad062 in netlink_echo_callback (nlh=nlh at entry=0x7fffffffcda0, data=data at entry=0x7fffffffde10) at monitor.c:924 #15 0x00007ffff7fb6748 i...
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
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
2013 Feb 13
14
[Bridge] [PATCH v10 net-next 00/12] VLAN filtering/VLAN aware bridge
Changes since v9: * series re-ordering so make functionality more distinct. Basic vlan filtering is patches 1-4. Support for PVID/untagged vlans is patches 5 and 6. VLAN support for FDB/MDB is patches 7-11. Patch 12 is still additional egress policy. * Slight simplification to code that extracts the VID from skb. Since we now depend on the vlan module, at the time of input skb_tci is