diff options
Diffstat (limited to 'net/ipv4/arp.c')
-rw-r--r-- | net/ipv4/arp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 5b24c65b13c6..d8248198bcd7 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -253,7 +253,7 @@ static int arp_constructor(struct neighbour *neigh) | |||
253 | neigh->parms = neigh_parms_clone(parms); | 253 | neigh->parms = neigh_parms_clone(parms); |
254 | rcu_read_unlock(); | 254 | rcu_read_unlock(); |
255 | 255 | ||
256 | if (dev->hard_header == NULL) { | 256 | if (!dev->header_ops) { |
257 | neigh->nud_state = NUD_NOARP; | 257 | neigh->nud_state = NUD_NOARP; |
258 | neigh->ops = &arp_direct_ops; | 258 | neigh->ops = &arp_direct_ops; |
259 | neigh->output = neigh->ops->queue_xmit; | 259 | neigh->output = neigh->ops->queue_xmit; |
@@ -310,10 +310,12 @@ static int arp_constructor(struct neighbour *neigh) | |||
310 | neigh->nud_state = NUD_NOARP; | 310 | neigh->nud_state = NUD_NOARP; |
311 | memcpy(neigh->ha, dev->broadcast, dev->addr_len); | 311 | memcpy(neigh->ha, dev->broadcast, dev->addr_len); |
312 | } | 312 | } |
313 | if (dev->hard_header_cache) | 313 | |
314 | if (dev->header_ops->cache) | ||
314 | neigh->ops = &arp_hh_ops; | 315 | neigh->ops = &arp_hh_ops; |
315 | else | 316 | else |
316 | neigh->ops = &arp_generic_ops; | 317 | neigh->ops = &arp_generic_ops; |
318 | |||
317 | if (neigh->nud_state&NUD_VALID) | 319 | if (neigh->nud_state&NUD_VALID) |
318 | neigh->output = neigh->ops->connected_output; | 320 | neigh->output = neigh->ops->connected_output; |
319 | else | 321 | else |