mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kchen <kchen@synology.com>
To: David Miller <davem@davemloft.net>
Cc: nikolay@cumulusnetworks.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, JianJhen Chen <kchen@synology.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] net: bridge: fix a bug on using a neighbour cache entry without checking its state
Date: Tue, 8 Jan 2019 14:04:04 +0800	[thread overview]
Message-ID: <c1c44397-057c-1ce6-dd52-62f15066e203@synology.com> (raw)
In-Reply-To: <20190107.091031.100384065611982323.davem@davemloft.net>


From: David Miller <davem@davemloft.net>
Date: Mon, 07 Jan 2019 09:10:31 -0800

 > From: David Miller <davem@davemloft.net>
 >
> From: kchen <kchen@synology.com>
> Date: Sun,  6 Jan 2019 11:28:13 +0800
> 
>> From: JianJhen Chen <kchen@synology.com>
>>
>> When handling DNAT'ed packets on a bridge device, the neighbour cache entry
>> from lookup was used without checking its state. It means that a cache entry
>> in the NUD_STALE state will be used directly instead of entering the NUD_DELAY
>> state to confirm the reachability of the neighbor.
>>
>> This problem becomes worse after commit 2724680bceee ("neigh: Keep neighbour
>> cache entries if number of them is small enough."), since all neighbour cache
>> entries in the NUD_STALE state will be kept in the neighbour table as long as
>> the number of cache entries does not exceed the value specified in gc_thresh1.
>>
>> This commit validates the state of a neighbour cache entry before using
>> the entry.
>>
>> Signed-off-by: JianJhen Chen <kchen@synology.com>
>> Reviewed-by: JinLin Chen <jlchen@synology.com>
> 
> Indeed, this looks correct.
> 
> Applied and queued up for -stable, thanks.
> 

Thank you for the confirmation.

      reply	other threads:[~2019-01-08  6:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-06  3:28 kchen
2019-01-07 17:10 ` David Miller
2019-01-08  6:04   ` kchen [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=c1c44397-057c-1ce6-dd52-62f15066e203@synology.com \
    --to=kchen@synology.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.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

all inboxes | Powered by JetHome®