Commit 0592ff88 authored by Nikolay Aleksandrov's avatar Nikolay Aleksandrov Committed by David S. Miller

net: bridge: fdb_add_entry takes ndm as argument

We can just pass ndm as an argument instead of its fields separately.
Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b430081b
...@@ -793,11 +793,11 @@ int br_fdb_get(struct sk_buff *skb, ...@@ -793,11 +793,11 @@ int br_fdb_get(struct sk_buff *skb,
/* Update (create or replace) forwarding database entry */ /* Update (create or replace) forwarding database entry */
static int fdb_add_entry(struct net_bridge *br, struct net_bridge_port *source, static int fdb_add_entry(struct net_bridge *br, struct net_bridge_port *source,
const u8 *addr, u16 state, u16 flags, u16 vid, const u8 *addr, struct ndmsg *ndm, u16 flags, u16 vid)
u8 ndm_flags)
{ {
bool is_sticky = !!(ndm_flags & NTF_STICKY); bool is_sticky = !!(ndm->ndm_flags & NTF_STICKY);
struct net_bridge_fdb_entry *fdb; struct net_bridge_fdb_entry *fdb;
u16 state = ndm->ndm_state;
bool modified = false; bool modified = false;
/* If the port cannot learn allow only local and static entries */ /* If the port cannot learn allow only local and static entries */
...@@ -893,8 +893,7 @@ static int __br_fdb_add(struct ndmsg *ndm, struct net_bridge *br, ...@@ -893,8 +893,7 @@ static int __br_fdb_add(struct ndmsg *ndm, struct net_bridge *br,
err = br_fdb_external_learn_add(br, p, addr, vid, true); err = br_fdb_external_learn_add(br, p, addr, vid, true);
} else { } else {
spin_lock_bh(&br->hash_lock); spin_lock_bh(&br->hash_lock);
err = fdb_add_entry(br, p, addr, ndm->ndm_state, err = fdb_add_entry(br, p, addr, ndm, nlh_flags, vid);
nlh_flags, vid, ndm->ndm_flags);
spin_unlock_bh(&br->hash_lock); spin_unlock_bh(&br->hash_lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment