Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 2020 15:00:46 +0300
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        Martin Beran <martin@mber.cz>, freebsd-hackers@freebsd.org
Subject:   Re: Permanent NDP entries overriden by ICMPv6 Neighbor Advertisement
Message-ID:  <6709cb35-9a83-b72f-9090-9df9c498ae14@yandex.ru>
In-Reply-To: <66229645-df41-e964-9dd5-0dc4b1845a9b@mber.cz>
References:  <66229645-df41-e964-9dd5-0dc4b1845a9b@mber.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------85B238FEBA952BFD4ECCB7B6
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

On 31.03.2020 09:41, Martin Beran wrote:
> Hi,
> 
> when I set a permanent NDP entry by command
> 
> ndp -s <ip> <mac>
> 
> the record is denoted "permanent", by the specified MAC address is
> overriden by a received neighbor advisory for the same IP address, but
> with different MAC address. I tried this on FreeBSD 12.1-p2. Is this the
> intended behavior, or should a "permanent" entry be really permanent?

Hi,

I think the entry should be permanent. Can you try this patch?

-- 
WBR, Andrey V. Elsukov

--------------85B238FEBA952BFD4ECCB7B6
Content-Type: text/x-patch;
 name="nd6_nbr.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="nd6_nbr.diff"

Index: sys/netinet6/nd6_nbr.c
===================================================================
--- sys/netinet6/nd6_nbr.c	(revision 359434)
+++ sys/netinet6/nd6_nbr.c	(working copy)
@@ -754,6 +754,12 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len
 		goto freeit;
 	}
 
+	/*
+	 * Do not try to override static entry.
+	 */
+	if (ln->la_flags & LLE_STATIC)
+		goto freeit;
+
 	if (ln->ln_state == ND6_LLINFO_INCOMPLETE) {
 		/*
 		 * If the link-layer has address, and no lladdr option came,

--------------85B238FEBA952BFD4ECCB7B6--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6709cb35-9a83-b72f-9090-9df9c498ae14>