aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-09-27 01:15:01 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-28 20:54:15 -0400
commite448515c79c3785eae225c25e8cd5b90b470d0a6 (patch)
tree193578af763e2664df698352f59cb69ba68def62 /net/ipv4/route.c
parent00012e5bb9527022cbc843c5d372b282dbe6c4af (diff)
[IPV4] net/ipv4/route.c: trivial endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 4bb66fee4543..c42ed803c3eb 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1078,7 +1078,7 @@ static void ip_select_fb_ident(struct iphdr *iph)
1078 u32 salt; 1078 u32 salt;
1079 1079
1080 spin_lock_bh(&ip_fb_id_lock); 1080 spin_lock_bh(&ip_fb_id_lock);
1081 salt = secure_ip_id(ip_fallback_id ^ iph->daddr); 1081 salt = secure_ip_id((__force __be32)ip_fallback_id ^ iph->daddr);
1082 iph->id = htons(salt & 0xFFFF); 1082 iph->id = htons(salt & 0xFFFF);
1083 ip_fallback_id = salt; 1083 ip_fallback_id = salt;
1084 spin_unlock_bh(&ip_fb_id_lock); 1084 spin_unlock_bh(&ip_fb_id_lock);
@@ -1399,8 +1399,8 @@ unsigned short ip_rt_frag_needed(struct iphdr *iph, unsigned short new_mtu)
1399 int i; 1399 int i;
1400 unsigned short old_mtu = ntohs(iph->tot_len); 1400 unsigned short old_mtu = ntohs(iph->tot_len);
1401 struct rtable *rth; 1401 struct rtable *rth;
1402 u32 skeys[2] = { iph->saddr, 0, }; 1402 __be32 skeys[2] = { iph->saddr, 0, };
1403 u32 daddr = iph->daddr; 1403 __be32 daddr = iph->daddr;
1404 unsigned short est_mtu = 0; 1404 unsigned short est_mtu = 0;
1405 1405
1406 if (ipv4_config.no_pmtu_disc) 1406 if (ipv4_config.no_pmtu_disc)
@@ -1939,7 +1939,7 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
1939 if (MULTICAST(saddr) || BADCLASS(saddr) || LOOPBACK(saddr)) 1939 if (MULTICAST(saddr) || BADCLASS(saddr) || LOOPBACK(saddr))
1940 goto martian_source; 1940 goto martian_source;
1941 1941
1942 if (daddr == 0xFFFFFFFF || (saddr == 0 && daddr == 0)) 1942 if (daddr == htonl(0xFFFFFFFF) || (saddr == 0 && daddr == 0))
1943 goto brd_input; 1943 goto brd_input;
1944 1944
1945 /* Accept zero addresses only to limited broadcast; 1945 /* Accept zero addresses only to limited broadcast;
@@ -2172,7 +2172,7 @@ static inline int __mkroute_output(struct rtable **result,
2172 if (LOOPBACK(fl->fl4_src) && !(dev_out->flags&IFF_LOOPBACK)) 2172 if (LOOPBACK(fl->fl4_src) && !(dev_out->flags&IFF_LOOPBACK))
2173 return -EINVAL; 2173 return -EINVAL;
2174 2174
2175 if (fl->fl4_dst == 0xFFFFFFFF) 2175 if (fl->fl4_dst == htonl(0xFFFFFFFF))
2176 res->type = RTN_BROADCAST; 2176 res->type = RTN_BROADCAST;
2177 else if (MULTICAST(fl->fl4_dst)) 2177 else if (MULTICAST(fl->fl4_dst))
2178 res->type = RTN_MULTICAST; 2178 res->type = RTN_MULTICAST;
@@ -2418,7 +2418,7 @@ static int ip_route_output_slow(struct rtable **rp, const struct flowi *oldflp)
2418 */ 2418 */
2419 2419
2420 if (oldflp->oif == 0 2420 if (oldflp->oif == 0
2421 && (MULTICAST(oldflp->fl4_dst) || oldflp->fl4_dst == 0xFFFFFFFF)) { 2421 && (MULTICAST(oldflp->fl4_dst) || oldflp->fl4_dst == htonl(0xFFFFFFFF))) {
2422 /* Special hack: user can direct multicasts 2422 /* Special hack: user can direct multicasts
2423 and limited broadcast via necessary interface 2423 and limited broadcast via necessary interface
2424 without fiddling with IP_MULTICAST_IF or IP_PKTINFO. 2424 without fiddling with IP_MULTICAST_IF or IP_PKTINFO.
@@ -2455,7 +2455,7 @@ static int ip_route_output_slow(struct rtable **rp, const struct flowi *oldflp)
2455 goto out; /* Wrong error code */ 2455 goto out; /* Wrong error code */
2456 } 2456 }
2457 2457
2458 if (LOCAL_MCAST(oldflp->fl4_dst) || oldflp->fl4_dst == 0xFFFFFFFF) { 2458 if (LOCAL_MCAST(oldflp->fl4_dst) || oldflp->fl4_dst == htonl(0xFFFFFFFF)) {
2459 if (!fl.fl4_src) 2459 if (!fl.fl4_src)
2460 fl.fl4_src = inet_select_addr(dev_out, 0, 2460 fl.fl4_src = inet_select_addr(dev_out, 0,
2461 RT_SCOPE_LINK); 2461 RT_SCOPE_LINK);
@@ -2707,7 +2707,7 @@ static int rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq, int event,
2707 2707
2708 if (rt->fl.iif) { 2708 if (rt->fl.iif) {
2709#ifdef CONFIG_IP_MROUTE 2709#ifdef CONFIG_IP_MROUTE
2710 u32 dst = rt->rt_dst; 2710 __be32 dst = rt->rt_dst;
2711 2711
2712 if (MULTICAST(dst) && !LOCAL_MCAST(dst) && 2712 if (MULTICAST(dst) && !LOCAL_MCAST(dst) &&
2713 ipv4_devconf.mc_forwarding) { 2713 ipv4_devconf.mc_forwarding) {