[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 05 Jun 2019 17:00:59 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: lucien.xin@...il.com
Cc: netdev@...r.kernel.org, dsahern@...il.com
Subject: Re: [PATCH net] ipv4: not do cache for local delivery if
bc_forwarding is enabled
From: Xin Long <lucien.xin@...il.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@...hat.com>
> Signed-off-by: Xin Long <lucien.xin@...il.com>
Applied and queued up for -stable.
Powered by blists - more mailing lists