All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: lucien.xin@gmail.com
Cc: netdev@vger.kernel.org, dsahern@gmail.com
Subject: Re: [PATCH net] ipv4: not do cache for local delivery if bc_forwarding is enabled
Date: Wed, 05 Jun 2019 17:00:59 -0700 (PDT)	[thread overview]
Message-ID: <20190605.170059.665995320664978361.davem@davemloft.net> (raw)
In-Reply-To: <9b4ce2be76ea7a635fe431ec42a784db0196a5a0.1559473824.git.lucien.xin@gmail.com>

From: Xin Long <lucien.xin@gmail.com>
Date: Sun,  2 Jun 2019 19:10:24 +0800

> With the topo:
> 
>     h1 ---| rp1            |
>           |     route  rp3 |--- h3 (192.168.200.1)
>     h2 ---| rp2            |
> 
> If rp1 bc_forwarding is set while rp2 bc_forwarding is not, after
> doing "ping 192.168.200.255" on h1, then ping 192.168.200.255 on
> h2, and the packets can still be forwared.
> 
> This issue was caused by the input route cache. It should only do
> the cache for either bc forwarding or local delivery. Otherwise,
> local delivery can use the route cache for bc forwarding of other
> interfaces.
> 
> This patch is to fix it by not doing cache for local delivery if
> all.bc_forwarding is enabled.
> 
> Note that we don't fix it by checking route cache local flag after
> rt_cache_valid() in "local_input:" and "ip_mkroute_input", as the
> common route code shouldn't be touched for bc_forwarding.
> 
> Fixes: 5cbf777cfdf6 ("route: add support for directed broadcast forwarding")
> Reported-by: Jianlin Shi <jishi@redhat.com>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>

Applied and queued up for -stable.

      reply	other threads:[~2019-06-06  0:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-02 11:10 [PATCH net] ipv4: not do cache for local delivery if bc_forwarding is enabled Xin Long
2019-06-06  0:00 ` 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=20190605.170059.665995320664978361.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=lucien.xin@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.