diff options
Diffstat (limited to 'net/key/af_key.c')
-rw-r--r-- | net/key/af_key.c | 8 |
1 files changed, 4 insertions, 4 deletions
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)); |