Commit e6e0b60f authored by Alex Badea's avatar Alex Badea Committed by Stephen Hemminger

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: default avatarAlex Badea <abadea@ixiacom.com>
parent 15bb82c6
......@@ -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())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment