aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-05-06 22:10:13 -0700
committerDavid S. Miller <davem@davemloft.net>2020-05-06 22:10:13 -0700
commit3793faad7b5b730941b2efbc252d14374b60843a (patch)
treee1bea43727d87f8fd30ca169f465a3591f15d63b /net/core/neighbour.c
parentdsa: sja1105: dynamically allocate stats structure (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (diff)
downloadlinux-dev-3793faad7b5b730941b2efbc252d14374b60843a.tar.xz
linux-dev-3793faad7b5b730941b2efbc252d14374b60843a.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Conflicts were all overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r--net/core/neighbour.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 3f2263e79e4b..b607ea602774 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1956,6 +1956,9 @@ static int neigh_add(struct sk_buff *skb, struct nlmsghdr *nlh,
NEIGH_UPDATE_F_OVERRIDE_ISROUTER);
}
+ if (protocol)
+ neigh->protocol = protocol;
+
if (ndm->ndm_flags & NTF_EXT_LEARNED)
flags |= NEIGH_UPDATE_F_EXT_LEARNED;
@@ -1969,9 +1972,6 @@ static int neigh_add(struct sk_buff *skb, struct nlmsghdr *nlh,
err = __neigh_update(neigh, lladdr, ndm->ndm_state, flags,
NETLINK_CB(skb).portid, extack);
- if (protocol)
- neigh->protocol = protocol;
-
neigh_release(neigh);
out: