All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Alex Badea <abadea@ixiacom.com>
Cc: netdev@vger.kernel.org, Alex Badea <abadea@ixiacom.com>
Subject: Re: [PATCH iproute2] ip xfrm policy: allow different tmpl family
Date: Thu, 21 Jan 2010 10:11:31 -0800	[thread overview]
Message-ID: <20100121101131.51624e33@nehalam> (raw)
In-Reply-To: <1263223444-14092-1-git-send-email-abadea@ixiacom.com>

On Mon, 11 Jan 2010 17:24:04 +0200
Alex Badea <abadea@ixiacom.com> wrote:

> 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>
> ---
> 
> Rather than resetting preferred_family unconditionally, we could
> have a new optional keyword for TMPL, e.g. "ip xfrm policy add ...
> tmpl unspec mode tunnel ...".  Let me know if that would be preferred.
> 
>  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 11116e5..2788477 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())

applied

-- 

      reply	other threads:[~2010-01-21 18:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 15:24 [PATCH iproute2] ip xfrm policy: allow different tmpl family Alex Badea
2010-01-21 18:11 ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100121101131.51624e33@nehalam \
    --to=shemminger@vyatta.com \
    --cc=abadea@ixiacom.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.