提交 76b3f055 编写于 作者: M Miika Komu 提交者: David S. Miller

[IPSEC]: Add encapsulation family.

Signed-off-by: NMiika Komu <miika@iki.fi>
Signed-off-by: NDiego Beltrami <Diego.Beltrami@hiit.fi>
Signed-off-by: NKazunori Miyazawa <miyazawa@linux-ipv6.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 08dd1a50
...@@ -310,6 +310,8 @@ struct xfrm_tmpl ...@@ -310,6 +310,8 @@ struct xfrm_tmpl
/* Source address of tunnel. Ignored, if it is not a tunnel. */ /* Source address of tunnel. Ignored, if it is not a tunnel. */
xfrm_address_t saddr; xfrm_address_t saddr;
unsigned short encap_family;
__u32 reqid; __u32 reqid;
/* Mode: transport, tunnel etc. */ /* Mode: transport, tunnel etc. */
......
...@@ -1211,6 +1211,7 @@ xfrm_tmpl_resolve_one(struct xfrm_policy *policy, struct flowi *fl, ...@@ -1211,6 +1211,7 @@ xfrm_tmpl_resolve_one(struct xfrm_policy *policy, struct flowi *fl,
if (tmpl->mode == XFRM_MODE_TUNNEL) { if (tmpl->mode == XFRM_MODE_TUNNEL) {
remote = &tmpl->id.daddr; remote = &tmpl->id.daddr;
local = &tmpl->saddr; local = &tmpl->saddr;
family = tmpl->encap_family;
if (xfrm_addr_any(local, family)) { if (xfrm_addr_any(local, family)) {
error = xfrm_get_saddr(&tmp, remote, family); error = xfrm_get_saddr(&tmp, remote, family);
if (error) if (error)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册