diff options
-rw-r--r-- | include/net/arp.h | 8 | ||||
-rw-r--r-- | net/bridge/netfilter/ebt_arpreply.c | 2 | ||||
-rw-r--r-- | net/ipv4/arp.c | 30 |
3 files changed, 20 insertions, 20 deletions
diff --git a/include/net/arp.h b/include/net/arp.h index 643bded9f557..6a3d9a7d302b 100644 --- a/include/net/arp.h +++ b/include/net/arp.h | |||
@@ -12,15 +12,15 @@ extern struct neigh_table arp_tbl; | |||
12 | extern void arp_init(void); | 12 | extern void arp_init(void); |
13 | extern int arp_find(unsigned char *haddr, struct sk_buff *skb); | 13 | extern int arp_find(unsigned char *haddr, struct sk_buff *skb); |
14 | extern int arp_ioctl(unsigned int cmd, void __user *arg); | 14 | extern int arp_ioctl(unsigned int cmd, void __user *arg); |
15 | extern void arp_send(int type, int ptype, u32 dest_ip, | 15 | extern void arp_send(int type, int ptype, __be32 dest_ip, |
16 | struct net_device *dev, u32 src_ip, | 16 | struct net_device *dev, __be32 src_ip, |
17 | unsigned char *dest_hw, unsigned char *src_hw, unsigned char *th); | 17 | unsigned char *dest_hw, unsigned char *src_hw, unsigned char *th); |
18 | extern int arp_bind_neighbour(struct dst_entry *dst); | 18 | extern int arp_bind_neighbour(struct dst_entry *dst); |
19 | extern int arp_mc_map(u32 addr, u8 *haddr, struct net_device *dev, int dir); | 19 | extern int arp_mc_map(u32 addr, u8 *haddr, struct net_device *dev, int dir); |
20 | extern void arp_ifdown(struct net_device *dev); | 20 | extern void arp_ifdown(struct net_device *dev); |
21 | 21 | ||
22 | extern struct sk_buff *arp_create(int type, int ptype, u32 dest_ip, | 22 | extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, |
23 | struct net_device *dev, u32 src_ip, | 23 | struct net_device *dev, __be32 src_ip, |
24 | unsigned char *dest_hw, unsigned char *src_hw, | 24 | unsigned char *dest_hw, unsigned char *src_hw, |
25 | unsigned char *target_hw); | 25 | unsigned char *target_hw); |
26 | extern void arp_xmit(struct sk_buff *skb); | 26 | extern void arp_xmit(struct sk_buff *skb); |
diff --git a/net/bridge/netfilter/ebt_arpreply.c b/net/bridge/netfilter/ebt_arpreply.c index d19fc4b328dc..0aa7b9910a86 100644 --- a/net/bridge/netfilter/ebt_arpreply.c +++ b/net/bridge/netfilter/ebt_arpreply.c | |||
@@ -20,7 +20,7 @@ static int ebt_target_reply(struct sk_buff **pskb, unsigned int hooknr, | |||
20 | const void *data, unsigned int datalen) | 20 | const void *data, unsigned int datalen) |
21 | { | 21 | { |
22 | struct ebt_arpreply_info *info = (struct ebt_arpreply_info *)data; | 22 | struct ebt_arpreply_info *info = (struct ebt_arpreply_info *)data; |
23 | u32 _sip, *siptr, _dip, *diptr; | 23 | __be32 _sip, *siptr, _dip, *diptr; |
24 | struct arphdr _ah, *ap; | 24 | struct arphdr _ah, *ap; |
25 | unsigned char _sha[ETH_ALEN], *shp; | 25 | unsigned char _sha[ETH_ALEN], *shp; |
26 | struct sk_buff *skb = *pskb; | 26 | struct sk_buff *skb = *pskb; |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 2a29a5ebc978..cfe5c8474286 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -385,7 +385,7 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb) | |||
385 | } | 385 | } |
386 | 386 | ||
387 | static int arp_ignore(struct in_device *in_dev, struct net_device *dev, | 387 | static int arp_ignore(struct in_device *in_dev, struct net_device *dev, |
388 | u32 sip, u32 tip) | 388 | __be32 sip, __be32 tip) |
389 | { | 389 | { |
390 | int scope; | 390 | int scope; |
391 | 391 | ||
@@ -420,7 +420,7 @@ static int arp_ignore(struct in_device *in_dev, struct net_device *dev, | |||
420 | return !inet_confirm_addr(dev, sip, tip, scope); | 420 | return !inet_confirm_addr(dev, sip, tip, scope); |
421 | } | 421 | } |
422 | 422 | ||
423 | static int arp_filter(__u32 sip, __u32 tip, struct net_device *dev) | 423 | static int arp_filter(__be32 sip, __be32 tip, struct net_device *dev) |
424 | { | 424 | { |
425 | struct flowi fl = { .nl_u = { .ip4_u = { .daddr = sip, | 425 | struct flowi fl = { .nl_u = { .ip4_u = { .daddr = sip, |
426 | .saddr = tip } } }; | 426 | .saddr = tip } } }; |
@@ -449,7 +449,7 @@ static int arp_filter(__u32 sip, __u32 tip, struct net_device *dev) | |||
449 | * is allowed to use this function, it is scheduled to be removed. --ANK | 449 | * is allowed to use this function, it is scheduled to be removed. --ANK |
450 | */ | 450 | */ |
451 | 451 | ||
452 | static int arp_set_predefined(int addr_hint, unsigned char * haddr, u32 paddr, struct net_device * dev) | 452 | static int arp_set_predefined(int addr_hint, unsigned char * haddr, __be32 paddr, struct net_device * dev) |
453 | { | 453 | { |
454 | switch (addr_hint) { | 454 | switch (addr_hint) { |
455 | case RTN_LOCAL: | 455 | case RTN_LOCAL: |
@@ -511,7 +511,7 @@ int arp_bind_neighbour(struct dst_entry *dst) | |||
511 | if (dev == NULL) | 511 | if (dev == NULL) |
512 | return -EINVAL; | 512 | return -EINVAL; |
513 | if (n == NULL) { | 513 | if (n == NULL) { |
514 | u32 nexthop = ((struct rtable*)dst)->rt_gateway; | 514 | __be32 nexthop = ((struct rtable*)dst)->rt_gateway; |
515 | if (dev->flags&(IFF_LOOPBACK|IFF_POINTOPOINT)) | 515 | if (dev->flags&(IFF_LOOPBACK|IFF_POINTOPOINT)) |
516 | nexthop = 0; | 516 | nexthop = 0; |
517 | n = __neigh_lookup_errno( | 517 | n = __neigh_lookup_errno( |
@@ -560,8 +560,8 @@ static inline int arp_fwd_proxy(struct in_device *in_dev, struct rtable *rt) | |||
560 | * Create an arp packet. If (dest_hw == NULL), we create a broadcast | 560 | * Create an arp packet. If (dest_hw == NULL), we create a broadcast |
561 | * message. | 561 | * message. |
562 | */ | 562 | */ |
563 | struct sk_buff *arp_create(int type, int ptype, u32 dest_ip, | 563 | struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, |
564 | struct net_device *dev, u32 src_ip, | 564 | struct net_device *dev, __be32 src_ip, |
565 | unsigned char *dest_hw, unsigned char *src_hw, | 565 | unsigned char *dest_hw, unsigned char *src_hw, |
566 | unsigned char *target_hw) | 566 | unsigned char *target_hw) |
567 | { | 567 | { |
@@ -675,8 +675,8 @@ void arp_xmit(struct sk_buff *skb) | |||
675 | /* | 675 | /* |
676 | * Create and send an arp packet. | 676 | * Create and send an arp packet. |
677 | */ | 677 | */ |
678 | void arp_send(int type, int ptype, u32 dest_ip, | 678 | void arp_send(int type, int ptype, __be32 dest_ip, |
679 | struct net_device *dev, u32 src_ip, | 679 | struct net_device *dev, __be32 src_ip, |
680 | unsigned char *dest_hw, unsigned char *src_hw, | 680 | unsigned char *dest_hw, unsigned char *src_hw, |
681 | unsigned char *target_hw) | 681 | unsigned char *target_hw) |
682 | { | 682 | { |
@@ -969,13 +969,13 @@ out_of_mem: | |||
969 | 969 | ||
970 | static int arp_req_set(struct arpreq *r, struct net_device * dev) | 970 | static int arp_req_set(struct arpreq *r, struct net_device * dev) |
971 | { | 971 | { |
972 | u32 ip = ((struct sockaddr_in *) &r->arp_pa)->sin_addr.s_addr; | 972 | __be32 ip = ((struct sockaddr_in *) &r->arp_pa)->sin_addr.s_addr; |
973 | struct neighbour *neigh; | 973 | struct neighbour *neigh; |
974 | int err; | 974 | int err; |
975 | 975 | ||
976 | if (r->arp_flags&ATF_PUBL) { | 976 | if (r->arp_flags&ATF_PUBL) { |
977 | u32 mask = ((struct sockaddr_in *) &r->arp_netmask)->sin_addr.s_addr; | 977 | __be32 mask = ((struct sockaddr_in *) &r->arp_netmask)->sin_addr.s_addr; |
978 | if (mask && mask != 0xFFFFFFFF) | 978 | if (mask && mask != htonl(0xFFFFFFFF)) |
979 | return -EINVAL; | 979 | return -EINVAL; |
980 | if (!dev && (r->arp_flags & ATF_COM)) { | 980 | if (!dev && (r->arp_flags & ATF_COM)) { |
981 | dev = dev_getbyhwaddr(r->arp_ha.sa_family, r->arp_ha.sa_data); | 981 | dev = dev_getbyhwaddr(r->arp_ha.sa_family, r->arp_ha.sa_data); |
@@ -1063,7 +1063,7 @@ static unsigned arp_state_to_flags(struct neighbour *neigh) | |||
1063 | 1063 | ||
1064 | static int arp_req_get(struct arpreq *r, struct net_device *dev) | 1064 | static int arp_req_get(struct arpreq *r, struct net_device *dev) |
1065 | { | 1065 | { |
1066 | u32 ip = ((struct sockaddr_in *) &r->arp_pa)->sin_addr.s_addr; | 1066 | __be32 ip = ((struct sockaddr_in *) &r->arp_pa)->sin_addr.s_addr; |
1067 | struct neighbour *neigh; | 1067 | struct neighbour *neigh; |
1068 | int err = -ENXIO; | 1068 | int err = -ENXIO; |
1069 | 1069 | ||
@@ -1084,13 +1084,13 @@ static int arp_req_get(struct arpreq *r, struct net_device *dev) | |||
1084 | static int arp_req_delete(struct arpreq *r, struct net_device * dev) | 1084 | static int arp_req_delete(struct arpreq *r, struct net_device * dev) |
1085 | { | 1085 | { |
1086 | int err; | 1086 | int err; |
1087 | u32 ip = ((struct sockaddr_in *)&r->arp_pa)->sin_addr.s_addr; | 1087 | __be32 ip = ((struct sockaddr_in *)&r->arp_pa)->sin_addr.s_addr; |
1088 | struct neighbour *neigh; | 1088 | struct neighbour *neigh; |
1089 | 1089 | ||
1090 | if (r->arp_flags & ATF_PUBL) { | 1090 | if (r->arp_flags & ATF_PUBL) { |
1091 | u32 mask = | 1091 | __be32 mask = |
1092 | ((struct sockaddr_in *)&r->arp_netmask)->sin_addr.s_addr; | 1092 | ((struct sockaddr_in *)&r->arp_netmask)->sin_addr.s_addr; |
1093 | if (mask == 0xFFFFFFFF) | 1093 | if (mask == htonl(0xFFFFFFFF)) |
1094 | return pneigh_delete(&arp_tbl, &ip, dev); | 1094 | return pneigh_delete(&arp_tbl, &ip, dev); |
1095 | if (mask == 0) { | 1095 | if (mask == 0) { |
1096 | if (dev == NULL) { | 1096 | if (dev == NULL) { |