summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranlan_cs <vic.lan@pica8.com>2022-03-30 11:44:36 +0200
committeranlan_cs <vic.lan@pica8.com>2022-03-30 11:50:21 +0200
commit2be18df4dc03b7c231f6a802c36beeca267ca5e5 (patch)
treef0c661bcd8a3cdc0d28f2dd1a1935ba5d21c78e9
parentzebra: use "assert" instead of unnecessary check (diff)
downloadfrr-2be18df4dc03b7c231f6a802c36beeca267ca5e5.tar.xz
frr-2be18df4dc03b7c231f6a802c36beeca267ca5e5.zip
zebra: remove unnecessary check for parsing macfdb
Since `NDA_VLAN` is no longer mannually defined in header file, the check for `NDA_VLAN` should be removed. Signed-off-by: anlan_cs <vic.lan@pica8.com>
-rw-r--r--zebra/rt_netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index f2cf9122f..2ff083dec 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -3273,7 +3273,7 @@ static int netlink_macfdb_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
memcpy(&mac, RTA_DATA(tb[NDA_LLADDR]), ETH_ALEN);
- if ((NDA_VLAN <= NDA_MAX) && tb[NDA_VLAN]) {
+ if (tb[NDA_VLAN]) {
vid_present = 1;
vid = *(uint16_t *)RTA_DATA(tb[NDA_VLAN]);
snprintf(vid_buf, sizeof(vid_buf), " VLAN %u", vid);