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>
This commit is contained in:
Alex Badea 2010-01-11 17:24:04 +02:00 committed by Stephen Hemminger
parent 15bb82c6fb
commit e6e0b60f2a
1 changed files with 2 additions and 2 deletions

View File

@ -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())