summaryrefslogtreecommitdiff
path: root/src/xlat/rtnl_ifla_bridge_flags.in
diff options
context:
space:
mode:
authorEugene Syromyatnikov <evgsyr@gmail.com>2021-10-18 05:13:34 +0200
committerDmitry V. Levin <ldv@strace.io>2021-11-12 15:41:37 +0000
commit63ef457326729e018855b9f394bfb62432e0930a (patch)
treeaad4147596090e90fe855f167f036ab643529843 /src/xlat/rtnl_ifla_bridge_flags.in
parent03c3b1ccd0627d3555cbb8ab443e9902d3c7efc9 (diff)
downloadstrace-63ef457326729e018855b9f394bfb62432e0930a.tar.gz
rtnl_link: implement IFLA_AF_SPEC decoding for AF_BRIDGE
It is special with relation to the others as it employs a completely different structure, disregarding the existing one. * src/xlat/rtnl_ifla_af_spec_bridge_attrs.in: New file. * src/xlat/rtnl_ifla_af_spec_bridge_vlan_tunnel_info_attrs.in: Likewise. * src/xlat/rtnl_ifla_bridge_flags.in: Likewise. * src/xlat/rtnl_ifla_bridge_modes.in: Likewise. * src/defs.h (nl_bridge_vlan_flags): New declaration. * src/rtnl_link.c: Include <linux/if_bridge.h>, "xlat/rtnl_ifla_af_spec_bridge_attrs.h", "xlat/rtnl_ifla_af_spec_bridge_vlan_tunnel_info_attrs.h", "xlat/rtnl_ifla_bridge_flags.h", and "xlat/rtnl_ifla_bridge_modes.h". (decode_ifla_bridge_flags, decode_ifla_bridge_mode, decode_ifla_bridge_vlan_info, decode_bridge_vlan_info_flags, decode_ifla_bridge_vlan_tunnel_info): New functions. (ifla_af_spec_bridge_vlan_tunnel_info_decoders, ifla_af_spec_bridge_nla_decoders): New decoder tables. (decode_ifla_af_spec): Add special handling for the ifi_family=AF_BRIDGE case by calling decode_nlattr directly with rtnl_ifla_af_spec_bridge_attrs and ifla_af_spec_bridge_nla_decoders. * tests/nlattr_ifla_af_spec.c: Include <linux/if_bridge.h>. (msg_af, msg_af_str): New static variables. (IFLA_AF): New macro, define to msg_af. (IFLA_AF_STR): New macro, define to msg_af_str. (init_IFLA_BRIDGE_VLAN_TUNNEL_INFO_msg, print_IFLA_BRIDGE_VLAN_TUNNEL_INFO_msg): New functions, defined via AF_SPEC_FUNCS. (main): Check unsupported IFLA_AF_SPEC address families for each ifinfomsg address family, skip AF_BRIDGE; add AF_BRIDGE IFLA_AF_SPEC checks. * NEWS: Mention it.
Diffstat (limited to 'src/xlat/rtnl_ifla_bridge_flags.in')
-rw-r--r--src/xlat/rtnl_ifla_bridge_flags.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/xlat/rtnl_ifla_bridge_flags.in b/src/xlat/rtnl_ifla_bridge_flags.in
new file mode 100644
index 000000000..477ef23bd
--- /dev/null
+++ b/src/xlat/rtnl_ifla_bridge_flags.in
@@ -0,0 +1,3 @@
+#unconditional
+BRIDGE_FLAGS_MASTER 1
+BRIDGE_FLAGS_SELF 2