aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/arp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 3f0730ec0a21..d12f31b0c107 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -235,8 +235,6 @@ static int arp_constructor(struct neighbour *neigh)
235 struct in_device *in_dev; 235 struct in_device *in_dev;
236 struct neigh_parms *parms; 236 struct neigh_parms *parms;
237 237
238 neigh->type = inet_addr_type(&init_net, addr);
239
240 rcu_read_lock(); 238 rcu_read_lock();
241 in_dev = __in_dev_get_rcu(dev); 239 in_dev = __in_dev_get_rcu(dev);
242 if (in_dev == NULL) { 240 if (in_dev == NULL) {
@@ -244,6 +242,8 @@ static int arp_constructor(struct neighbour *neigh)
244 return -EINVAL; 242 return -EINVAL;
245 } 243 }
246 244
245 neigh->type = inet_addr_type(&init_net, addr);
246
247 parms = in_dev->arp_parms; 247 parms = in_dev->arp_parms;
248 __neigh_parms_put(neigh->parms); 248 __neigh_parms_put(neigh->parms);
249 neigh->parms = neigh_parms_clone(parms); 249 neigh->parms = neigh_parms_clone(parms);