]> git.ipfire.org Git - thirdparty/iproute2.git/commit
bridge: mdb: Use a boolean to indicate nest is required
authorIdo Schimmel <idosch@nvidia.com>
Thu, 15 Dec 2022 17:52:25 +0000 (19:52 +0200)
committerDavid Ahern <dsahern@kernel.org>
Mon, 19 Dec 2022 01:37:11 +0000 (18:37 -0700)
commit935d942e69392bc66c837db1ce453feed8308392
treee7699b59fe6c1fb9d51c8a3f773856ce3f7af92b
parent3715a146e813745ed14cc1cf8cdd527495832c9e
bridge: mdb: Use a boolean to indicate nest is required

Currently, the only attribute inside the 'MDBA_SET_ENTRY_ATTRS' nest is
'MDBE_ATTR_SOURCE', but subsequent patches are going to add more
attributes to the nest.

Prepare for the addition of these attributes by determining the
necessity of the nest from a boolean variable that is set whenever one
of these attributes is parsed. This avoids the need to have one long
condition that checks for the presence of one of the individual
attributes.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
bridge/mdb.c