aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-09-27 21:46:11 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-28 21:02:33 -0400
commit8f83f23e6db8b9a9fe787d02f73489224668c4e2 (patch)
tree23348f11be718d24229ced9c49c0d2c82c759104
parentf9d07e41f89e7305eb2c0475c170c51d21425581 (diff)
[XFRM]: ports in struct xfrm_selector annotated
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/xfrm.h8
-rw-r--r--net/ipv4/xfrm4_state.c4
-rw-r--r--net/ipv6/xfrm6_state.c4
-rw-r--r--net/key/af_key.c8
4 files changed, 12 insertions, 12 deletions
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index 14ecd19f4cdc..3aae9b9ce79b 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -49,10 +49,10 @@ struct xfrm_selector
49{ 49{
50 xfrm_address_t daddr; 50 xfrm_address_t daddr;
51 xfrm_address_t saddr; 51 xfrm_address_t saddr;
52 __u16 dport; 52 __be16 dport;
53 __u16 dport_mask; 53 __be16 dport_mask;
54 __u16 sport; 54 __be16 sport;
55 __u16 sport_mask; 55 __be16 sport_mask;
56 __u16 family; 56 __u16 family;
57 __u8 prefixlen_d; 57 __u8 prefixlen_d;
58 __u8 prefixlen_s; 58 __u8 prefixlen_s;
diff --git a/net/ipv4/xfrm4_state.c b/net/ipv4/xfrm4_state.c
index fe2034494d08..3cc3df0c6ece 100644
--- a/net/ipv4/xfrm4_state.c
+++ b/net/ipv4/xfrm4_state.c
@@ -29,9 +29,9 @@ __xfrm4_init_tempsel(struct xfrm_state *x, struct flowi *fl,
29 x->sel.daddr.a4 = fl->fl4_dst; 29 x->sel.daddr.a4 = fl->fl4_dst;
30 x->sel.saddr.a4 = fl->fl4_src; 30 x->sel.saddr.a4 = fl->fl4_src;
31 x->sel.dport = xfrm_flowi_dport(fl); 31 x->sel.dport = xfrm_flowi_dport(fl);
32 x->sel.dport_mask = ~0; 32 x->sel.dport_mask = htons(0xffff);
33 x->sel.sport = xfrm_flowi_sport(fl); 33 x->sel.sport = xfrm_flowi_sport(fl);
34 x->sel.sport_mask = ~0; 34 x->sel.sport_mask = htons(0xffff);
35 x->sel.prefixlen_d = 32; 35 x->sel.prefixlen_d = 32;
36 x->sel.prefixlen_s = 32; 36 x->sel.prefixlen_s = 32;
37 x->sel.proto = fl->proto; 37 x->sel.proto = fl->proto;
diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c
index 711bfafb2472..9ddaa9d41539 100644
--- a/net/ipv6/xfrm6_state.c
+++ b/net/ipv6/xfrm6_state.c
@@ -29,9 +29,9 @@ __xfrm6_init_tempsel(struct xfrm_state *x, struct flowi *fl,
29 ipv6_addr_copy((struct in6_addr *)&x->sel.daddr, &fl->fl6_dst); 29 ipv6_addr_copy((struct in6_addr *)&x->sel.daddr, &fl->fl6_dst);
30 ipv6_addr_copy((struct in6_addr *)&x->sel.saddr, &fl->fl6_src); 30 ipv6_addr_copy((struct in6_addr *)&x->sel.saddr, &fl->fl6_src);
31 x->sel.dport = xfrm_flowi_dport(fl); 31 x->sel.dport = xfrm_flowi_dport(fl);
32 x->sel.dport_mask = ~0; 32 x->sel.dport_mask = htons(0xffff);
33 x->sel.sport = xfrm_flowi_sport(fl); 33 x->sel.sport = xfrm_flowi_sport(fl);
34 x->sel.sport_mask = ~0; 34 x->sel.sport_mask = htons(0xffff);
35 x->sel.prefixlen_d = 128; 35 x->sel.prefixlen_d = 128;
36 x->sel.prefixlen_s = 128; 36 x->sel.prefixlen_s = 128;
37 x->sel.proto = fl->proto; 37 x->sel.proto = fl->proto;
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 83b443ddc72f..ff98e70b0931 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -2140,7 +2140,7 @@ static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h
2140 xp->selector.proto = pfkey_proto_to_xfrm(sa->sadb_address_proto); 2140 xp->selector.proto = pfkey_proto_to_xfrm(sa->sadb_address_proto);
2141 xp->selector.sport = ((struct sockaddr_in *)(sa+1))->sin_port; 2141 xp->selector.sport = ((struct sockaddr_in *)(sa+1))->sin_port;
2142 if (xp->selector.sport) 2142 if (xp->selector.sport)
2143 xp->selector.sport_mask = ~0; 2143 xp->selector.sport_mask = htons(0xffff);
2144 2144
2145 sa = ext_hdrs[SADB_EXT_ADDRESS_DST-1], 2145 sa = ext_hdrs[SADB_EXT_ADDRESS_DST-1],
2146 pfkey_sadb_addr2xfrm_addr(sa, &xp->selector.daddr); 2146 pfkey_sadb_addr2xfrm_addr(sa, &xp->selector.daddr);
@@ -2153,7 +2153,7 @@ static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h
2153 2153
2154 xp->selector.dport = ((struct sockaddr_in *)(sa+1))->sin_port; 2154 xp->selector.dport = ((struct sockaddr_in *)(sa+1))->sin_port;
2155 if (xp->selector.dport) 2155 if (xp->selector.dport)
2156 xp->selector.dport_mask = ~0; 2156 xp->selector.dport_mask = htons(0xffff);
2157 2157
2158 sec_ctx = (struct sadb_x_sec_ctx *) ext_hdrs[SADB_X_EXT_SEC_CTX-1]; 2158 sec_ctx = (struct sadb_x_sec_ctx *) ext_hdrs[SADB_X_EXT_SEC_CTX-1];
2159 if (sec_ctx != NULL) { 2159 if (sec_ctx != NULL) {
@@ -2243,7 +2243,7 @@ static int pfkey_spddelete(struct sock *sk, struct sk_buff *skb, struct sadb_msg
2243 sel.proto = pfkey_proto_to_xfrm(sa->sadb_address_proto); 2243 sel.proto = pfkey_proto_to_xfrm(sa->sadb_address_proto);
2244 sel.sport = ((struct sockaddr_in *)(sa+1))->sin_port; 2244 sel.sport = ((struct sockaddr_in *)(sa+1))->sin_port;
2245 if (sel.sport) 2245 if (sel.sport)
2246 sel.sport_mask = ~0; 2246 sel.sport_mask = htons(0xffff);
2247 2247
2248 sa = ext_hdrs[SADB_EXT_ADDRESS_DST-1], 2248 sa = ext_hdrs[SADB_EXT_ADDRESS_DST-1],
2249 pfkey_sadb_addr2xfrm_addr(sa, &sel.daddr); 2249 pfkey_sadb_addr2xfrm_addr(sa, &sel.daddr);
@@ -2251,7 +2251,7 @@ static int pfkey_spddelete(struct sock *sk, struct sk_buff *skb, struct sadb_msg
2251 sel.proto = pfkey_proto_to_xfrm(sa->sadb_address_proto); 2251 sel.proto = pfkey_proto_to_xfrm(sa->sadb_address_proto);
2252 sel.dport = ((struct sockaddr_in *)(sa+1))->sin_port; 2252 sel.dport = ((struct sockaddr_in *)(sa+1))->sin_port;
2253 if (sel.dport) 2253 if (sel.dport)
2254 sel.dport_mask = ~0; 2254 sel.dport_mask = htons(0xffff);
2255 2255
2256 sec_ctx = (struct sadb_x_sec_ctx *) ext_hdrs[SADB_X_EXT_SEC_CTX-1]; 2256 sec_ctx = (struct sadb_x_sec_ctx *) ext_hdrs[SADB_X_EXT_SEC_CTX-1];
2257 memset(&tmp, 0, sizeof(struct xfrm_policy)); 2257 memset(&tmp, 0, sizeof(struct xfrm_policy));