aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/sit.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-14 23:56:00 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:22:52 -0500
commite69a4adc669fe210817ec50ae3f9a7a5ad62d4e8 (patch)
treede4666cd772f02aac4cbacf11251faeb54e99d1d /net/ipv6/sit.c
parentb09b845ca6724c3bbdc00c0cb2313258c7189ca9 (diff)
[IPV6]: Misc 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/ipv6/sit.c')
-rw-r--r--net/ipv6/sit.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index be699f85b2c..85ff3dc4514 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -60,7 +60,7 @@
60 */ 60 */
61 61
62#define HASH_SIZE 16 62#define HASH_SIZE 16
63#define HASH(addr) ((addr^(addr>>4))&0xF) 63#define HASH(addr) (((__force u32)addr^((__force u32)addr>>4))&0xF)
64 64
65static int ipip6_fb_tunnel_init(struct net_device *dev); 65static int ipip6_fb_tunnel_init(struct net_device *dev);
66static int ipip6_tunnel_init(struct net_device *dev); 66static int ipip6_tunnel_init(struct net_device *dev);
@@ -76,7 +76,7 @@ static struct ip_tunnel **tunnels[4] = { tunnels_wc, tunnels_l, tunnels_r, tunne
76 76
77static DEFINE_RWLOCK(ipip6_lock); 77static DEFINE_RWLOCK(ipip6_lock);
78 78
79static struct ip_tunnel * ipip6_tunnel_lookup(u32 remote, u32 local) 79static struct ip_tunnel * ipip6_tunnel_lookup(__be32 remote, __be32 local)
80{ 80{
81 unsigned h0 = HASH(remote); 81 unsigned h0 = HASH(remote);
82 unsigned h1 = HASH(local); 82 unsigned h1 = HASH(local);
@@ -102,8 +102,8 @@ static struct ip_tunnel * ipip6_tunnel_lookup(u32 remote, u32 local)
102 102
103static struct ip_tunnel ** ipip6_bucket(struct ip_tunnel *t) 103static struct ip_tunnel ** ipip6_bucket(struct ip_tunnel *t)
104{ 104{
105 u32 remote = t->parms.iph.daddr; 105 __be32 remote = t->parms.iph.daddr;
106 u32 local = t->parms.iph.saddr; 106 __be32 local = t->parms.iph.saddr;
107 unsigned h = 0; 107 unsigned h = 0;
108 int prio = 0; 108 int prio = 0;
109 109
@@ -144,8 +144,8 @@ static void ipip6_tunnel_link(struct ip_tunnel *t)
144 144
145static struct ip_tunnel * ipip6_tunnel_locate(struct ip_tunnel_parm *parms, int create) 145static struct ip_tunnel * ipip6_tunnel_locate(struct ip_tunnel_parm *parms, int create)
146{ 146{
147 u32 remote = parms->iph.daddr; 147 __be32 remote = parms->iph.daddr;
148 u32 local = parms->iph.saddr; 148 __be32 local = parms->iph.saddr;
149 struct ip_tunnel *t, **tp, *nt; 149 struct ip_tunnel *t, **tp, *nt;
150 struct net_device *dev; 150 struct net_device *dev;
151 unsigned h = 0; 151 unsigned h = 0;
@@ -405,9 +405,9 @@ out:
405/* Returns the embedded IPv4 address if the IPv6 address 405/* Returns the embedded IPv4 address if the IPv6 address
406 comes from 6to4 (RFC 3056) addr space */ 406 comes from 6to4 (RFC 3056) addr space */
407 407
408static inline u32 try_6to4(struct in6_addr *v6dst) 408static inline __be32 try_6to4(struct in6_addr *v6dst)
409{ 409{
410 u32 dst = 0; 410 __be32 dst = 0;
411 411
412 if (v6dst->s6_addr16[0] == htons(0x2002)) { 412 if (v6dst->s6_addr16[0] == htons(0x2002)) {
413 /* 6to4 v6 addr has 16 bits prefix, 32 v4addr, 16 SLA, ... */ 413 /* 6to4 v6 addr has 16 bits prefix, 32 v4addr, 16 SLA, ... */
@@ -432,7 +432,7 @@ static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
432 struct net_device *tdev; /* Device to other host */ 432 struct net_device *tdev; /* Device to other host */
433 struct iphdr *iph; /* Our new IP header */ 433 struct iphdr *iph; /* Our new IP header */
434 int max_headroom; /* The extra header space needed */ 434 int max_headroom; /* The extra header space needed */
435 u32 dst = tiph->daddr; 435 __be32 dst = tiph->daddr;
436 int mtu; 436 int mtu;
437 struct in6_addr *addr6; 437 struct in6_addr *addr6;
438 int addr_type; 438 int addr_type;