netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Antoine Tenart <atenart@kernel.org>,
	davem@davemloft.net, dsahern@kernel.org, kuba@kernel.org
Cc: netdev@vger.kernel.org, Stephen Suryaputra <ssuryaextr@gmail.com>,
	Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net] vrf: do not push non-ND strict packets with a source LLA through packet taps again
Date: Sun, 20 Jun 2021 21:20:01 -0600	[thread overview]
Message-ID: <231434ea-9eb0-28c8-baab-cf979cdf7e47@gmail.com> (raw)
In-Reply-To: <162419114873.131954.7165131880961444756@kwain>

On 6/20/21 6:12 AM, Antoine Tenart wrote:
> Quoting David Ahern (2021-06-19 03:18:50)
>> On 6/18/21 9:15 AM, Antoine Tenart wrote:
>>> --- a/drivers/net/vrf.c
>>> +++ b/drivers/net/vrf.c
>>> @@ -1366,22 +1366,22 @@ static struct sk_buff *vrf_ip6_rcv(struct net_device *vrf_dev,
>>>       int orig_iif = skb->skb_iif;
>>>       bool need_strict = rt6_need_strict(&ipv6_hdr(skb)->daddr);
>>>       bool is_ndisc = ipv6_ndisc_frame(skb);
>>> -     bool is_ll_src;
>>>  
>>>       /* loopback, multicast & non-ND link-local traffic; do not push through
>>>        * packet taps again. Reset pkt_type for upper layers to process skb.
>>> -      * for packets with lladdr src, however, skip so that the dst can be
>>> -      * determine at input using original ifindex in the case that daddr
>>> -      * needs strict
>>> +      * For strict packets with a source LLA, determine the dst using the
>>> +      * original ifindex.
>>>        */
>>> -     is_ll_src = ipv6_addr_type(&ipv6_hdr(skb)->saddr) & IPV6_ADDR_LINKLOCAL;
>>> -     if (skb->pkt_type == PACKET_LOOPBACK ||
>>> -         (need_strict && !is_ndisc && !is_ll_src)) {
>>> +     if (skb->pkt_type == PACKET_LOOPBACK || (need_strict && !is_ndisc)) {
>>>               skb->dev = vrf_dev;
>>>               skb->skb_iif = vrf_dev->ifindex;
>>>               IP6CB(skb)->flags |= IP6SKB_L3SLAVE;
>>> +
>>>               if (skb->pkt_type == PACKET_LOOPBACK)
>>>                       skb->pkt_type = PACKET_HOST;
>>> +             else if (ipv6_addr_type(&ipv6_hdr(skb)->saddr) & IPV6_ADDR_LINKLOCAL)
>>> +                     vrf_ip6_input_dst(skb, vrf_dev, orig_iif);
>>> +
>>>               goto out;
>>>       }
>>
>> you are basically moving Stephen's is_ll_src within the need_strict and
>> not ND.
> 
> That's right.
> 
>> Did you run the fcnal-test script and verify no change in test results?
> 
> Yes, I saw no regression, and the tests Stephen added were still OK.
> 
> Antoine
> 

Reviewed-by: David Ahern <dsahern@kernel.org>


  reply	other threads:[~2021-06-21  3:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 15:15 [PATCH net] vrf: do not push non-ND strict packets with a source LLA through packet taps again Antoine Tenart
2021-06-19  1:18 ` David Ahern
2021-06-20 12:12   ` Antoine Tenart
2021-06-21  3:20     ` David Ahern [this message]
2021-06-21 19:00 ` patchwork-bot+netdevbpf

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=231434ea-9eb0-28c8-baab-cf979cdf7e47@gmail.com \
    --to=dsahern@gmail.com \
    --cc=atenart@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=ssuryaextr@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).