diff options
author | Eugene Syromyatnikov <evgsyr@gmail.com> | 2018-06-10 12:28:11 +0200 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2018-06-11 14:02:06 +0000 |
commit | 193e5f6afff7b08c12385072a5c1678848b156cd (patch) | |
tree | b08231f20c00f09713f4261a0936301c18ed6422 | |
parent | deeb2d42ae2a943fd01f8cf589aa049f37ca40ea (diff) | |
download | strace-193e5f6afff7b08c12385072a5c1678848b156cd.tar.gz |
rtnl_link: decode struct ifla_bridge_id unconditionally
Since it is relatively simple.
* rtnl_link.c (decode_ifla_bridge_id): Provide struct definition for
the id variable.
[!HAVE_STRUCT_IFLA_BRIDGE_ID] (decode_ifla_bridge_id): Decode struct
ifla_bridge_id.
-rw-r--r-- | rtnl_link.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/rtnl_link.c b/rtnl_link.c index f5ce7dd2e..f16c7373c 100644 --- a/rtnl_link.c +++ b/rtnl_link.c @@ -121,8 +121,10 @@ decode_ifla_bridge_id(struct tcb *const tcp, const unsigned int len, const void *const opaque_data) { -#ifdef HAVE_STRUCT_IFLA_BRIDGE_ID - struct ifla_bridge_id id; + struct { + uint8_t prio[2]; + uint8_t addr[6]; + } id; if (len < sizeof(id)) return false; @@ -133,9 +135,6 @@ decode_ifla_bridge_id(struct tcb *const tcp, } return true; -#else - return false; -#endif } static const nla_decoder_t ifla_brport_nla_decoders[] = { |