diff options
author | Alex Badea <abadea@ixiacom.com> | 2010-01-11 17:24:04 +0200 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-01-21 10:11:23 -0800 |
commit | e6e0b60f2a3d2720d4d9d6d0a50e3b48deea45e4 (patch) | |
tree | 1bde22627b1a7058980cd76dc24047ac73ddd7a2 /ip/xfrm_policy.c | |
parent | 15bb82c6fb9ae401f48eb7f03179ee6669496bf0 (diff) |
ip xfrm policy: allow different tmpl family
Allow tmpl IP addresses to have a different family than
selector addresses. This is useful in conjunction with
XFRM_STATE_AF_UNSPEC.
Signed-off-by: Alex Badea <abadea@ixiacom.com>
Diffstat (limited to 'ip/xfrm_policy.c')
-rw-r--r-- | ip/xfrm_policy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ip/xfrm_policy.c b/ip/xfrm_policy.c index 11116e5f..27884773 100644 --- a/ip/xfrm_policy.c +++ b/ip/xfrm_policy.c @@ -201,10 +201,10 @@ static int xfrm_tmpl_parse(struct xfrm_user_tmpl *tmpl, break; } idp = *argv; + preferred_family = AF_UNSPEC; xfrm_id_parse(&tmpl->saddr, &tmpl->id, &tmpl->family, 0, &argc, &argv); - if (preferred_family == AF_UNSPEC) - preferred_family = tmpl->family; + preferred_family = tmpl->family; } if (!NEXT_ARG_OK()) |