public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Christophe Gouault <christophe.gouault@6wind•com>
To: Hangbin Liu <liuhangbin@gmail•com>, network dev <netdev@vger•kernel.org>
Cc: Cong Wang <xiyou.wangcong@gmail•com>,
	Saurabh Mohan <saurabh.mohan@vyatta•com>,
	Steffen Klassert <steffen.klassert@secunet•com>
Subject: Re: [PATCH] vti: remove GRE_KEY flag for vti tunnel
Date: Wed, 04 Dec 2013 13:46:40 +0100	[thread overview]
Message-ID: <529F2430.9050906@6wind.com> (raw)
In-Reply-To: <1386146917-2951-1-git-send-email-liuhangbin@gmail.com>

Hello Hangbin,

vti interfaces precisely need an o_key to be configured (it must be set
to the mark of ipsec policies attached to this interface). Consequently,
this flag must not be removed.

Best Regards,
Christophe

On 12/04/2013 09:48 AM, Hangbin Liu wrote:
> vti tunnel use IPPROTO_IPIP instead of IPPROTO_GRE, and keys are not allowed
> with ipip tunnel. So there is no reason to set GRE_KEY flag for vti.
>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail•com>
> ---
>   net/ipv4/ip_vti.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
> index 52b802a..58c4e6a 100644
> --- a/net/ipv4/ip_vti.c
> +++ b/net/ipv4/ip_vti.c
> @@ -185,10 +185,8 @@ vti_tunnel_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
>   	if (err)
>   		return err;
>
> -	if (cmd != SIOCDELTUNNEL) {
> -		p.i_flags |= GRE_KEY | VTI_ISVTI;
> -		p.o_flags |= GRE_KEY;
> -	}
> +	if (cmd != SIOCDELTUNNEL)
> +		p.i_flags |= VTI_ISVTI;
>
>   	if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p)))
>   		return -EFAULT;
>

  reply	other threads:[~2013-12-04 12:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-04  8:48 [PATCH] vti: remove GRE_KEY flag for vti tunnel Hangbin Liu
2013-12-04 12:46 ` Christophe Gouault [this message]
2013-12-05  8:47   ` Steffen Klassert
2013-12-05  9:47     ` Hangbin Liu
2013-12-05 10:51       ` Steffen Klassert
2013-12-05 16:15         ` Hangbin Liu
2013-12-05  9:47   ` Hangbin Liu
2013-12-05 10:58     ` Steffen Klassert

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=529F2430.9050906@6wind.com \
    --to=christophe.gouault@6wind$(echo .)com \
    --cc=liuhangbin@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=saurabh.mohan@vyatta$(echo .)com \
    --cc=steffen.klassert@secunet$(echo .)com \
    --cc=xiyou.wangcong@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox