netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: elicooper@gmx.com
Cc: netdev@vger.kernel.org, tom@herbertland.com
Subject: Re: [PATCH] ipv6: Don't unset flowi6_proto in ipxip6_tnl_xmit()
Date: Thu, 01 Sep 2016 23:41:47 -0700 (PDT)	[thread overview]
Message-ID: <20160901.234147.2300105032472747034.davem@davemloft.net> (raw)
In-Reply-To: <3c42e6d9-0057-69c3-6135-b32f056201e9@gmx.com>

From: Eli Cooper <elicooper@gmx.com>
Date: Thu, 1 Sep 2016 09:18:04 +0800

> Hello,
> 
> On 2016/9/1 4:56, David Miller wrote:
>> From: Eli Cooper <elicooper@gmx.com>
>> Date: Fri, 26 Aug 2016 23:52:29 +0800
>>
>>> @@ -1174,6 +1174,7 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
>>>  		encap_limit = t->parms.encap_limit;
>>>  
>>>  	memcpy(&fl6, &t->fl.u.ip6, sizeof(fl6));
>>> +	fl6.flowi6_proto = IPPROTO_IPIP;
>> Let's just simply have t->fl have the proto setup properly, just like
>> in GRE.
>>
>> Assigning it explicitly every packet transmit doesn't make much sense.
> 
> I doubt that. Unlike GRE, where the proto must be IPPROTO_GRE, the proto
> here can be either IPPROTO_IPV6 or IPPROTO_IPIP for a single tunnel, and
> t->fl is shared by them. Thus it has to be assigned for every packet.

You're right.  Patch applied, thanks for explaining.

      reply	other threads:[~2016-09-02  6:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-26 15:52 [PATCH] ipv6: Don't unset flowi6_proto in ipxip6_tnl_xmit() Eli Cooper
2016-08-26 19:49 ` Shmulik Ladkani
2016-08-27  1:09   ` Eli Cooper
2016-08-31 20:56 ` David Miller
2016-09-01  1:18   ` Eli Cooper
2016-09-02  6:41     ` David Miller [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=20160901.234147.2300105032472747034.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=elicooper@gmx.com \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).