Re: [PATCH net-next v1 1/2] net: Update bhash2 when socket's rcv saddr changes

Paolo Abeni <[email protected]>
Newsgroups org.kernel.vger.dccp,org.kernel.vger.netdev
Message-ID <[email protected]>
Hello,

On Tue, 2022-05-31 at 15:04 -0700, Eric Dumazet wrote:
> On Tue, May 24, 2022 at 4:20 PM Joanne Koong <[email protected]> wrote:
> > 
> > Commit d5a42de8bdbe ("net: Add a second bind table hashed by port and
> > address") added a second bind table, bhash2, that hashes by a socket's port
> > and rcv address.
> > 
> > However, there are two cases where the socket's rcv saddr can change
> > after it has been binded:
> > 
> > 1) The case where there is a bind() call on "::" (IPADDR_ANY) and then
> > a connect() call. The kernel will assign the socket an address when it
> > handles the connect()
> > 
> > 2) In inet_sk_reselect_saddr(), which is called when rerouting fails
> > when rebuilding the sk header (invoked by inet_sk_rebuild_header)
> > 
> > In these two cases, we need to update the bhash2 table by removing the
> > entry for the old address, and adding a new entry reflecting the updated
> > address.
> > 
> > Reported-by: [email protected]
> > Fixes: d5a42de8bdbe ("net: Add a second bind table hashed by port and address")
> > Signed-off-by: Joanne Koong <[email protected]>
> > ---
> 
> Reviewed-by: Eric Dumazet <[email protected]>
> 
Apparently this patch (and 2/2) did not reach the ML nor patchwork (let
alone my inbox ;). I've no idea on the root cause, sorry.

@Joanne: could you please re-post the series? (you can retain Eric's
review tag)

Thanks!

Paolo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.