diff options
Diffstat (limited to 'net/ipv4/arp.c')
-rw-r--r-- | net/ipv4/arp.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 8bf312bdea1..b425748f02d 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -241,7 +241,7 @@ static int arp_constructor(struct neighbour *neigh) | |||
241 | neigh->type = inet_addr_type(addr); | 241 | neigh->type = inet_addr_type(addr); |
242 | 242 | ||
243 | rcu_read_lock(); | 243 | rcu_read_lock(); |
244 | in_dev = rcu_dereference(__in_dev_get(dev)); | 244 | in_dev = __in_dev_get_rcu(dev); |
245 | if (in_dev == NULL) { | 245 | if (in_dev == NULL) { |
246 | rcu_read_unlock(); | 246 | rcu_read_unlock(); |
247 | return -EINVAL; | 247 | return -EINVAL; |
@@ -697,12 +697,6 @@ void arp_send(int type, int ptype, u32 dest_ip, | |||
697 | arp_xmit(skb); | 697 | arp_xmit(skb); |
698 | } | 698 | } |
699 | 699 | ||
700 | static void parp_redo(struct sk_buff *skb) | ||
701 | { | ||
702 | nf_reset(skb); | ||
703 | arp_rcv(skb, skb->dev, NULL, skb->dev); | ||
704 | } | ||
705 | |||
706 | /* | 700 | /* |
707 | * Process an arp request. | 701 | * Process an arp request. |
708 | */ | 702 | */ |
@@ -922,6 +916,11 @@ out: | |||
922 | return 0; | 916 | return 0; |
923 | } | 917 | } |
924 | 918 | ||
919 | static void parp_redo(struct sk_buff *skb) | ||
920 | { | ||
921 | arp_process(skb); | ||
922 | } | ||
923 | |||
925 | 924 | ||
926 | /* | 925 | /* |
927 | * Receive an arp request from the device layer. | 926 | * Receive an arp request from the device layer. |
@@ -990,8 +989,8 @@ static int arp_req_set(struct arpreq *r, struct net_device * dev) | |||
990 | ipv4_devconf.proxy_arp = 1; | 989 | ipv4_devconf.proxy_arp = 1; |
991 | return 0; | 990 | return 0; |
992 | } | 991 | } |
993 | if (__in_dev_get(dev)) { | 992 | if (__in_dev_get_rtnl(dev)) { |
994 | __in_dev_get(dev)->cnf.proxy_arp = 1; | 993 | __in_dev_get_rtnl(dev)->cnf.proxy_arp = 1; |
995 | return 0; | 994 | return 0; |
996 | } | 995 | } |
997 | return -ENXIO; | 996 | return -ENXIO; |
@@ -1096,8 +1095,8 @@ static int arp_req_delete(struct arpreq *r, struct net_device * dev) | |||
1096 | ipv4_devconf.proxy_arp = 0; | 1095 | ipv4_devconf.proxy_arp = 0; |
1097 | return 0; | 1096 | return 0; |
1098 | } | 1097 | } |
1099 | if (__in_dev_get(dev)) { | 1098 | if (__in_dev_get_rtnl(dev)) { |
1100 | __in_dev_get(dev)->cnf.proxy_arp = 0; | 1099 | __in_dev_get_rtnl(dev)->cnf.proxy_arp = 0; |
1101 | return 0; | 1100 | return 0; |
1102 | } | 1101 | } |
1103 | return -ENXIO; | 1102 | return -ENXIO; |