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.
This commit is contained in:
Eugene Syromyatnikov 2018-06-10 12:28:11 +02:00 committed by Dmitry V. Levin
parent deeb2d42ae
commit 193e5f6aff

View File

@ -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[] = {