diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/arp.c | 30 |
1 files changed, 15 insertions, 15 deletions
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) { |