diff options
Diffstat (limited to 'net/key/af_key.c')
-rw-r--r-- | net/key/af_key.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index 797c744a8438..19e047b0e678 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -1765,7 +1765,7 @@ parse_ipsecrequest(struct xfrm_policy *xp, struct sadb_x_ipsecrequest *rq) | |||
1765 | } | 1765 | } |
1766 | 1766 | ||
1767 | /* addresses present only in tunnel mode */ | 1767 | /* addresses present only in tunnel mode */ |
1768 | if (t->mode) { | 1768 | if (t->mode == XFRM_MODE_TUNNEL) { |
1769 | switch (xp->family) { | 1769 | switch (xp->family) { |
1770 | case AF_INET: | 1770 | case AF_INET: |
1771 | sin = (void*)(rq+1); | 1771 | sin = (void*)(rq+1); |
@@ -1997,7 +1997,7 @@ static void pfkey_xfrm_policy2msg(struct sk_buff *skb, struct xfrm_policy *xp, i | |||
1997 | int req_size; | 1997 | int req_size; |
1998 | 1998 | ||
1999 | req_size = sizeof(struct sadb_x_ipsecrequest); | 1999 | req_size = sizeof(struct sadb_x_ipsecrequest); |
2000 | if (t->mode) | 2000 | if (t->mode == XFRM_MODE_TUNNEL) |
2001 | req_size += 2*socklen; | 2001 | req_size += 2*socklen; |
2002 | else | 2002 | else |
2003 | size -= 2*socklen; | 2003 | size -= 2*socklen; |
@@ -2013,7 +2013,7 @@ static void pfkey_xfrm_policy2msg(struct sk_buff *skb, struct xfrm_policy *xp, i | |||
2013 | if (t->optional) | 2013 | if (t->optional) |
2014 | rq->sadb_x_ipsecrequest_level = IPSEC_LEVEL_USE; | 2014 | rq->sadb_x_ipsecrequest_level = IPSEC_LEVEL_USE; |
2015 | rq->sadb_x_ipsecrequest_reqid = t->reqid; | 2015 | rq->sadb_x_ipsecrequest_reqid = t->reqid; |
2016 | if (t->mode) { | 2016 | if (t->mode == XFRM_MODE_TUNNEL) { |
2017 | switch (xp->family) { | 2017 | switch (xp->family) { |
2018 | case AF_INET: | 2018 | case AF_INET: |
2019 | sin = (void*)(rq+1); | 2019 | sin = (void*)(rq+1); |