Skip to content

Commit

Permalink
nl: do not pass NDA_VLAN with vid=0
Browse files Browse the repository at this point in the history
The kernel rejects it

Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Jan 3, 2023
1 parent f68307f commit 9ee8f43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nl.c
Expand Up @@ -709,7 +709,8 @@ int bridger_nl_fdb_refresh(struct fdb_entry *f)
ndmsg.ndm_ifindex = device_ifindex(f->dev);
msg = nlmsg_alloc_simple(RTM_NEWNEIGH, NLM_F_REQUEST);
nlmsg_append(msg, &ndmsg, sizeof(ndmsg), NLMSG_ALIGNTO);
nla_put_u16(msg, NDA_VLAN, f->key.vlan);
if (f->key.vlan)
nla_put_u16(msg, NDA_VLAN, f->key.vlan);
nla_put(msg, NDA_LLADDR, ETH_ALEN, f->key.addr);
nl_send_auto_complete(event_sock, msg);
nlmsg_free(msg);
Expand Down

0 comments on commit 9ee8f43

Please sign in to comment.