netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: xiyou.wangcong@gmail.com
Cc: netdev@vger.kernel.org, ebiederm@xmission.com, cwang@twopensource.com
Subject: Re: [Patch net] loopback: explicitly set pkt_type to PACKET_HOST
Date: Fri, 16 May 2014 15:17:01 -0400 (EDT)	[thread overview]
Message-ID: <20140516.151701.1642109390027874890.davem@davemloft.net> (raw)
In-Reply-To: <CAM_iQpVGG92NMYTJuCXg3yhCkVDyL3Tf=5HJy6n2V1Z89yySzw@mail.gmail.com>

From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Fri, 16 May 2014 10:52:09 -0700

> On Thu, May 15, 2014 at 1:34 PM, David Miller <davem@davemloft.net> wrote:
>> From: Cong Wang <xiyou.wangcong@gmail.com>
>> Date: Wed, 14 May 2014 11:39:22 -0700
>>
>>> From: Cong Wang <cwang@twopensource.com>
>>>
>>> In a corner case where I redirect the packets from veth to lo,
>>> packets are dropped silently when entering IP stack. This is
>>> due to we have a different MAC addr on veth, so the packets are
>>> marked as PACKET_OTHERHOST. And after they are redirect to lo,
>>> this value is kept since lo has the same MAC addr with the packets.
>>> Loopback should explicitly set it to PACKET_HOST before calling
>>> eth_type_trans() for this specific case.
>>>
>>> Cc: David S. Miller <davem@davemloft.net>
>>> Cc: "Eric W. Biederman" <ebiederm@xmission.com>
>>> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
>>> Signed-off-by: Cong Wang <cwang@twopensource.com>
>>
>> How exactly are you performing this redirection?
> 
> Oh, I meant using tc mirred action to redirect packets from vethX to lo.
> Sorry for confusing.

I think you can't expect arbitrary redirection of packets from an outgoing
interface back into the stack via loopback to work like that.

The is never any legitimate reason in this type of flow to override the
decisions made by eth_type_trans() as to the disposition of the packet type.

I'm not applying this, sorry.

  reply	other threads:[~2014-05-16 19:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14 18:39 [Patch net] loopback: explicitly set pkt_type to PACKET_HOST Cong Wang
2014-05-14 21:24 ` Cong Wang
2014-05-15 20:34 ` David Miller
2014-05-16 17:52   ` Cong Wang
2014-05-16 19:17     ` David Miller [this message]
2014-05-16 20:57       ` Cong Wang

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=20140516.151701.1642109390027874890.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=cwang@twopensource.com \
    --cc=ebiederm@xmission.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.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).