linux/net/bridge
Michal Kubecek ae0be8de9a netlink: make nla_nest_start() add NLA_F_NESTED flag
Even if the NLA_F_NESTED flag was introduced more than 11 years ago, most
netlink based interfaces (including recently added ones) are still not
setting it in kernel generated messages. Without the flag, message parsers
not aware of attribute semantics (e.g. wireshark dissector or libmnl's
mnl_nlmsg_fprintf()) cannot recognize nested attributes and won't display
the structure of their contents.

Unfortunately we cannot just add the flag everywhere as there may be
userspace applications which check nlattr::nla_type directly rather than
through a helper masking out the flags. Therefore the patch renames
nla_nest_start() to nla_nest_start_noflag() and introduces nla_nest_start()
as a wrapper adding NLA_F_NESTED. The calls which add NLA_F_NESTED manually
are rewritten to use nla_nest_start().

Except for changes in include/net/netlink.h, the patch was generated using
this semantic patch:

@@ expression E1, E2; @@
-nla_nest_start(E1, E2)
+nla_nest_start_noflag(E1, E2)

@@ expression E1, E2; @@
-nla_nest_start_noflag(E1, E2 | NLA_F_NESTED)
+nla_nest_start(E1, E2)

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27 17:03:44 -04:00
..
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-04-25 23:52:29 -04:00
br_arp_nd_proxy.c bridge: reduce size of input cb to 16 bytes 2019-04-12 01:47:27 +02:00
br_device.c bridge: support for ndo_fdb_get 2018-12-16 14:42:34 -08:00
br_fdb.c rhashtable: use bit_spin_locks to protect hash bucket. 2019-04-07 19:12:12 -07:00
br_forward.c net: bridge: update multicast stats from maybe_deliver() 2019-04-04 10:49:27 -07:00
br_if.c net: bridge: use netif_is_bridge_port() 2019-03-29 13:48:40 -07:00
br_input.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-04-17 11:26:25 -07:00
br_ioctl.c net: bridge: add notifications for the bridge dev on vlan change 2017-11-02 15:53:40 +09:00
br_mdb.c netlink: make nla_nest_start() add NLA_F_NESTED flag 2019-04-27 17:03:44 -04:00
br_multicast.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-04-17 11:26:25 -07:00
br_netfilter_hooks.c netfilter: bridge: set skb transport_header before entering NF_INET_PRE_ROUTING 2019-03-18 16:21:54 +01:00
br_netfilter_ipv6.c netfilter: bridge: set skb transport_header before entering NF_INET_PRE_ROUTING 2019-03-18 16:21:54 +01:00
br_netlink_tunnel.c netlink: make nla_nest_start() add NLA_F_NESTED flag 2019-04-27 17:03:44 -04:00
br_netlink.c netlink: make nla_nest_start() add NLA_F_NESTED flag 2019-04-27 17:03:44 -04:00
br_nf_core.c xfrm: Move dst->path into struct xfrm_dst 2017-11-30 09:54:26 -05:00
br_private_stp.h net: bridge: add helper to set topology change 2016-12-10 21:27:23 -05:00
br_private_tunnel.h bridge: netlink: make setlink/dellink notifications more accurate 2017-10-29 11:03:43 +09:00
br_private.h bridge: support binding vlan dev link state to vlan member bridge ports 2019-04-19 13:58:17 -07:00
br_stp_bpdu.c net: introduce __skb_put_[zero, data, u8] 2017-06-20 13:30:14 -04:00
br_stp_if.c net: bridge: optimize backup_port fdb convergence 2019-04-04 17:39:47 -07:00
br_stp_timer.c net: bridge: Convert timers to use timer_setup() 2017-11-03 15:42:49 +09:00
br_stp.c net: bridge: add notifications for the bridge dev on vlan change 2017-11-02 15:53:40 +09:00
br_switchdev.c net: switchdev: Replace port attr set SDO with a notification 2019-02-27 12:39:56 -08:00
br_sysfs_br.c net: bridge: mark hash_elasticity as obsolete 2018-12-05 17:01:51 -08:00
br_sysfs_if.c net: bridge: remove redundant checks for null p->dev and p->br 2018-11-25 10:25:43 -08:00
br_vlan_tunnel.c rhashtable: use bit_spin_locks to protect hash bucket. 2019-04-07 19:12:12 -07:00
br_vlan.c bridge: update vlan dev link state for bridge netdev changes 2019-04-19 13:58:17 -07:00
br.c bridge: Fix possible use-after-free when deleting bridge port 2019-04-22 22:17:47 -07:00
Kconfig docs: fix some broken documentation references 2018-09-20 11:09:53 -06:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00