netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: David Miller <davem@davemloft.net>
Cc: netfilter-devel@vger.kernel.org, Netdev <netdev@vger.kernel.org>,
	shannon.nelson@oracle.com
Subject: Re: [PATCH net 3/5] sunvnet: use icmp_ndo_send helper
Date: Mon, 10 Feb 2020 14:34:24 +0100	[thread overview]
Message-ID: <CAHmME9qSQaWJi_npqX7YQFhCsuikvKhGe62o-ztEaD5h-zvd1A@mail.gmail.com> (raw)
In-Reply-To: <20200210.123619.546500251078019206.davem@davemloft.net>

On Mon, Feb 10, 2020 at 12:36 PM David Miller <davem@davemloft.net> wrote:
>
> From: "Jason A. Donenfeld" <Jason@zx2c4.com>
> Date: Sun,  9 Feb 2020 15:31:41 +0100
>
> > Because sunvnet is calling icmp from network device context, it should use
> > the ndo helper so that the rate limiting applies correctly.
> >
> > Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
>
> Two things, first you should resubmit this patch series with a proper
> header [PATCH 0/N ... ] posting.

Ack, will do for v2.

>
> Second:
>
> > @@ -1363,14 +1363,14 @@ sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev,
> >                       rt = ip_route_output_key(dev_net(dev), &fl4);
> >                       if (!IS_ERR(rt)) {
> >                               skb_dst_set(skb, &rt->dst);
> > -                             icmp_send(skb, ICMP_DEST_UNREACH,
> > -                                       ICMP_FRAG_NEEDED,
> > -                                       htonl(localmtu));
> > +                             icmp_ndo_send(skb, ICMP_DEST_UNREACH,
> > +                                           ICMP_FRAG_NEEDED,
> > +                                           htonl(localmtu));
> >                       }
> >               }
>
> Well, obviously if the saddr could be wrong here then this invalidates
> the route lookup done in the lines above your changes.
>
> It looks like this code is just making sure the ICMP path is routable
> which is kinda bogus because that is the icmp code's job.  So very
> likely the right thing to do is to remove all of that route lookup
> and check code entirely.  And that matches what all the other instances
> of driver icmp calls in your patces do.

Good point. I'll simplify that by just getting rid of the superfluous
route lookup and make sure that the other ones are okay too.

Thanks,
Jason

  reply	other threads:[~2020-02-10 13:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-09 14:31 [PATCH net 1/5] icmp: introduce helper for NAT'd source address in ndo context Jason A. Donenfeld
2020-02-09 14:31 ` [PATCH net 2/5] gtp: use icmp_ndo_send helper Jason A. Donenfeld
2020-02-09 14:31 ` [PATCH net 3/5] sunvnet: " Jason A. Donenfeld
2020-02-10 11:36   ` David Miller
2020-02-10 13:34     ` Jason A. Donenfeld [this message]
2020-02-09 14:31 ` [PATCH net 4/5] wireguard: " Jason A. Donenfeld
2020-02-09 14:31 ` [PATCH net 5/5] xfrm: interface: " Jason A. Donenfeld
2020-02-10 11:50 ` [PATCH net 1/5] icmp: introduce helper for NAT'd source address in ndo context Florian Westphal
2020-02-10 13:33   ` Jason A. Donenfeld

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=CAHmME9qSQaWJi_npqX7YQFhCsuikvKhGe62o-ztEaD5h-zvd1A@mail.gmail.com \
    --to=jason@zx2c4.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=shannon.nelson@oracle.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).