NetBSD Problem Report #51179
From mlelstv@tazz.1st.de Sun May 29 09:27:39 2016
Return-Path: <mlelstv@tazz.1st.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 736F37A218
for <gnats-bugs@gnats.NetBSD.org>; Sun, 29 May 2016 09:27:39 +0000 (UTC)
Message-Id: <20160529092655.249EF269FA@tazz.1st.de>
Date: Sun, 29 May 2016 11:26:55 +0200 (CEST)
From: mlelstv@serpens.de
Reply-To: mlelstv@serpens.de
To: gnats-bugs@NetBSD.org
Subject: lingering arp entries
X-Send-Pr-Version: 3.95
>Number: 51179
>Category: kern
>Synopsis: lingering arp entries
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: mlelstv
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun May 29 09:30:00 +0000 2016
>Closed-Date: Sun Jul 24 05:50:06 +0000 2022
>Last-Modified: Sun Jul 24 05:50:06 +0000 2022
>Originator: Michael van Elst
>Release: NetBSD 7.99.29
>Organization:
>Environment:
System: NetBSD tazz 7.99.29 NetBSD 7.99.29 (TAZZ) #5: Sat May 28 08:36:59 CEST 2016 mlelstv@gossam:/home/netbsd-current/obj.amd64/home/netbsd-current/src/sys/arch/amd64/compile/TAZZ amd64
Architecture: x86_64
Machine: amd64
>Description:
arp entries become undeletable when an interface is shut down.
The system has two interfaces connected to the same network. One
interface is configured. Shutting down the active interface and
configuring the second interface causes arp entries for systems
on the network associated with both interfaces, e.g.
? (10.28.5.17) at b8:27:eb:12:34:56 on iwn0
? (10.28.5.17) at b8:27:eb:12:34:56 on wm0
You can however only delete one entry, the other persists and
is still used by the network stack.
# arp -d 10.28.5.17
# arp -na | grep 10.28.5.17
? (10.28.5.17) at b8:27:eb:12:34:56 on iwn0
# arp -d 10.28.5.17
arp: writing to routing socket: No such file or directory
# arp -na | grep 10.28.5.17
? (10.28.5.17) at b8:27:eb:12:34:56 on iwn0
>How-To-Repeat:
See above
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->ozaki-r
Responsible-Changed-By: ozaki-r@NetBSD.org
Responsible-Changed-When: Fri, 03 Jun 2016 03:37:06 +0000
Responsible-Changed-Why:
mine
From: "Ryota Ozaki" <ozaki-r@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51179 CVS commit: src/sys
Date: Thu, 22 Jun 2017 09:53:25 +0000
Module Name: src
Committed By: ozaki-r
Date: Thu Jun 22 09:53:25 UTC 2017
Modified Files:
src/sys/netinet: in.c
src/sys/netinet6: in6.c
Log Message:
Purge ARP/NDP entries on an interface when the interface is down
Fix PR kern/51179
To generate a diff of this commit:
cvs rdiff -u -r1.204 -r1.205 src/sys/netinet/in.c
cvs rdiff -u -r1.247 -r1.248 src/sys/netinet6/in6.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Ryota Ozaki" <ozaki-r@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51179 CVS commit: src
Date: Thu, 22 Jun 2017 09:56:48 +0000
Module Name: src
Committed By: ozaki-r
Date: Thu Jun 22 09:56:48 UTC 2017
Modified Files:
src/sys/net: if_llatbl.c if_llatbl.h route.c
src/tests/net/ndp: t_ra.sh
Log Message:
Purge all related L2 caches on removing a route
The change addresses situations similar to PR 51179.
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/net/if_llatbl.c
cvs rdiff -u -r1.10 -r1.11 src/sys/net/if_llatbl.h
cvs rdiff -u -r1.195 -r1.196 src/sys/net/route.c
cvs rdiff -u -r1.28 -r1.29 src/tests/net/ndp/t_ra.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Ryota Ozaki" <ozaki-r@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51179 CVS commit: src/sys/net
Date: Thu, 22 Jun 2017 09:58:04 +0000
Module Name: src
Committed By: ozaki-r
Date: Thu Jun 22 09:58:04 UTC 2017
Modified Files:
src/sys/net: rtsock.c
Log Message:
Purge L2 caches on changing an interface of a route
The change addresses situations similar to PR 51179.
To generate a diff of this commit:
cvs rdiff -u -r1.216 -r1.217 src/sys/net/rtsock.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Ryota Ozaki" <ozaki-r@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51179 CVS commit: src/tests/net
Date: Thu, 22 Jun 2017 10:06:34 +0000
Module Name: src
Committed By: ozaki-r
Date: Thu Jun 22 10:06:34 UTC 2017
Modified Files:
src/tests/net/arp: t_arp.sh
src/tests/net/ndp: t_ndp.sh
Log Message:
Test implicit removals of ARP/NDP entries
One test case reproudces PR 51179.
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/tests/net/arp/t_arp.sh
cvs rdiff -u -r1.23 -r1.24 src/tests/net/ndp/t_ndp.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: ozaki-r@NetBSD.org
State-Changed-When: Wed, 28 Jun 2017 08:19:46 +0000
State-Changed-Why:
The issue has been fixed. Could you confirm?
From: "Ryota Ozaki" <ozaki-r@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51179 CVS commit: src
Date: Wed, 28 Jun 2017 08:17:50 +0000
Module Name: src
Committed By: ozaki-r
Date: Wed Jun 28 08:17:50 UTC 2017
Modified Files:
src/tests/net/arp: t_arp.sh
src/tests/net/ndp: t_ndp.sh
src/usr.sbin/arp: arp.c
src/usr.sbin/ndp: ndp.c
Log Message:
Enable to remove multiple ARP/NDP entries for one destination
The kernel can have multiple ARP/NDP entries which have an indentical
destination on different interfaces. This is normal and can be
reproduce easily by ping -I or ping6 -S. We should be able to remove
such entries.
arp -d <ip> and ndp -d <ip> are changed to fetch all ARP/NDP entries
and remove matched entries. So we can remove multiple entries
described above. This fetch all and selective removal behavior is
the same as arp <ip> and ndp <ip>; they also do fetch all entries
and show only matched entries.
Related to PR 51179
To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/tests/net/arp/t_arp.sh
cvs rdiff -u -r1.28 -r1.29 src/tests/net/ndp/t_ndp.sh
cvs rdiff -u -r1.57 -r1.58 src/usr.sbin/arp/arp.c
cvs rdiff -u -r1.49 -r1.50 src/usr.sbin/ndp/ndp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51179 CVS commit: [netbsd-8] src
Date: Fri, 7 Jul 2017 13:57:27 +0000
Module Name: src
Committed By: martin
Date: Fri Jul 7 13:57:27 UTC 2017
Modified Files:
src/sbin/route [netbsd-8]: route.8 route.c rtutil.c
src/sys/net [netbsd-8]: if_llatbl.c if_llatbl.h route.c route.h
rtsock.c
src/sys/netinet [netbsd-8]: if_arp.c in.c
src/sys/netinet6 [netbsd-8]: in6.c nd6.c nd6.h
src/tests/net [netbsd-8]: net_common.sh
src/tests/net/arp [netbsd-8]: t_arp.sh
src/tests/net/ndp [netbsd-8]: t_ndp.sh t_ra.sh
src/tests/net/net [netbsd-8]: t_ipv6address.sh
src/tests/net/route [netbsd-8]: t_flags.sh t_flags6.sh t_route.sh
src/usr.sbin/arp [netbsd-8]: arp.c
src/usr.sbin/ndp [netbsd-8]: ndp.c
Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #107):
usr.sbin/arp/arp.c: revision 1.56
sys/net/rtsock.c: revision 1.218
sys/net/if_llatbl.c: revision 1.20
usr.sbin/arp/arp.c: revision 1.57
sys/net/rtsock.c: revision 1.219
sys/net/if_llatbl.c: revision 1.21
usr.sbin/arp/arp.c: revision 1.58
tests/net/net_common.sh: revision 1.19
sys/netinet6/nd6.h: revision 1.84
sys/netinet6/nd6.h: revision 1.85
tests/net/arp/t_arp.sh: revision 1.23
sys/netinet6/in6.c: revision 1.246
tests/net/arp/t_arp.sh: revision 1.24
sys/netinet6/in6.c: revision 1.247
tests/net/arp/t_arp.sh: revision 1.25
sys/netinet6/in6.c: revision 1.248
tests/net/arp/t_arp.sh: revision 1.26
usr.sbin/ndp/ndp.c: revision 1.49
tests/net/arp/t_arp.sh: revision 1.27
tests/net/ndp/t_ndp.sh: revision 1.20
tests/net/arp/t_arp.sh: revision 1.28
tests/net/ndp/t_ndp.sh: revision 1.21
tests/net/arp/t_arp.sh: revision 1.29
tests/net/ndp/t_ndp.sh: revision 1.22
tests/net/ndp/t_ndp.sh: revision 1.23
tests/net/route/t_flags6.sh: revision 1.13
tests/net/ndp/t_ndp.sh: revision 1.24
tests/net/route/t_flags6.sh: revision 1.14
tests/net/ndp/t_ndp.sh: revision 1.25
tests/net/route/t_flags6.sh: revision 1.15
tests/net/ndp/t_ndp.sh: revision 1.26
sbin/route/rtutil.c: revision 1.9
tests/net/ndp/t_ndp.sh: revision 1.27
tests/net/ndp/t_ndp.sh: revision 1.28
tests/net/net/t_ipv6address.sh: revision 1.14
tests/net/ndp/t_ra.sh: revision 1.28
tests/net/ndp/t_ndp.sh: revision 1.29
sys/net/route.h: revision 1.113
tests/net/ndp/t_ra.sh: revision 1.29
sys/net/rtsock.c: revision 1.220
sys/net/rtsock.c: revision 1.221
sys/net/rtsock.c: revision 1.222
sys/net/rtsock.c: revision 1.223
tests/net/route/t_route.sh: revision 1.13
sys/net/rtsock.c: revision 1.224
sys/net/route.c: revision 1.196
sys/net/if_llatbl.c: revision 1.19
sys/net/route.c: revision 1.197
sbin/route/route.c: revision 1.156
tests/net/route/t_flags.sh: revision 1.16
tests/net/route/t_flags.sh: revision 1.17
usr.sbin/ndp/ndp.c: revision 1.50
tests/net/route/t_flags.sh: revision 1.18
sys/netinet/in.c: revision 1.204
tests/net/route/t_flags.sh: revision 1.19
sys/netinet/in.c: revision 1.205
tests/net/arp/t_arp.sh: revision 1.30
tests/net/arp/t_arp.sh: revision 1.31
sys/net/if_llatbl.h: revision 1.11
tests/net/arp/t_arp.sh: revision 1.32
sys/net/if_llatbl.h: revision 1.12
tests/net/arp/t_arp.sh: revision 1.33
sys/netinet6/nd6.c: revision 1.233
sys/netinet6/nd6.c: revision 1.234
sys/netinet/if_arp.c: revision 1.251
sys/netinet6/nd6.c: revision 1.235
sys/netinet/if_arp.c: revision 1.252
sbin/route/route.8: revision 1.57
sys/net/rtsock.c: revision 1.214
sys/net/rtsock.c: revision 1.215
sys/net/rtsock.c: revision 1.216
sys/net/rtsock.c: revision 1.217
whitespace police
Simplify
We can assume that rt_ifp is always non-NULL.
Sending a routing message (RTM_ADD) on adding an llentry
A message used to be sent on adding a cloned route. Restore the
behavior for backward compatibility.
Requested by ryo@
Drop RTF_CONNECTED from a result of RTM_GET for ARP/NDP entries
ARP/NDP entries aren't connected routes.
Reported by ryo@
Support -c <count> option for route monitor
route command exits if it receives <count> routing messages where
<count> is a value specified by -c.
The option is useful to get only particular message(s) in a test script.
Test routing messages emitted on operations of ARP/NDP entries
Do netstat -a for an appropriate protocol
Add missing declarations for cleanup
Set net.inet.arp.keep only if it's required
Don't create a permanent L2 cache entry on adding an address to an interface
It was created to copy FreeBSD, however actually the cache isn't
necessary. Remove it to simplify the code and reduce the cost to
maintain it (e.g., keep a consistency with a corresponding local
route).
Fix typo
Fix in_lltable_match_prefix
The function has not been used but will be used soon.
Remove unused function (nd6_rem_ifa_lle)
Allow in6_lltable_free_entry to be called without holding the afdata lock of ifp as well as in_lltable_free_entry
This behavior is a bit odd and should be fixed in the future...
Purge ARP/NDP entries on an interface when the interface is down
Fix PR kern/51179
Purge all related L2 caches on removing a route
The change addresses situations similar to PR 51179.
Purge L2 caches on changing an interface of a route
The change addresses situations similar to PR 51179.
Test implicit removals of ARP/NDP entries
One test case reproudces PR 51179.
Fix build of kernels without both INET and INET6
Tweak lltable_sysctl_dumparp
- Rename lltable_sysctl_dumparp to lltable_sysctl_dump
because it's not only for ARP
- Enable it not only for INET but also for INET6
Fix usage of routing messages on arp -d and ndp -d
It didn't work as we expected; we should set RTA_GATEWAY not
RTA_IFP on RTM_GET to return an if_index and the kernel should
use it on RTM_DELETE.
Improve backward compatibility of (fake) routing messages on adding an ARP/NDP entry
A message originally included only DST and GATEWAY. Restore it.
Fix ifdef; care about a case w/ INET6 and w/o INET
Drop RTF_UP from a routing message of a deleted ARP/NDP entry
Check existence of ARP/NDP entries
Checking ARP/NDP entries is valid rather than checking routes.
Fix wrong comment
Drop RTF_LLINFO flag (now it's RTF_LLDATA) from local routes
They don't have llinfo anymore. And also the change fixes unexpected
behavior of ARP proxy.
Restore ARP/NDP entries to route show and netstat -r
Requested by dyoung@ some time ago
Enable to remove multiple ARP/NDP entries for one destination
The kernel can have multiple ARP/NDP entries which have an indentical
destination on different interfaces. This is normal and can be
reproduce easily by ping -I or ping6 -S. We should be able to remove
such entries.
arp -d <ip> and ndp -d <ip> are changed to fetch all ARP/NDP entries
and remove matched entries. So we can remove multiple entries
described above. This fetch all and selective removal behavior is
the same as arp <ip> and ndp <ip>; they also do fetch all entries
and show only matched entries.
Related to PR 51179
Check if ARP/NDP entries are purged when a related route is deleted
To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.56.8.1 src/sbin/route/route.8
cvs rdiff -u -r1.155 -r1.155.4.1 src/sbin/route/route.c
cvs rdiff -u -r1.8 -r1.8.8.1 src/sbin/route/rtutil.c
cvs rdiff -u -r1.18 -r1.18.6.1 src/sys/net/if_llatbl.c
cvs rdiff -u -r1.10 -r1.10.8.1 src/sys/net/if_llatbl.h
cvs rdiff -u -r1.194.6.1 -r1.194.6.2 src/sys/net/route.c
cvs rdiff -u -r1.112 -r1.112.4.1 src/sys/net/route.h
cvs rdiff -u -r1.213 -r1.213.2.1 src/sys/net/rtsock.c
cvs rdiff -u -r1.250.2.1 -r1.250.2.2 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.203 -r1.203.2.1 src/sys/netinet/in.c
cvs rdiff -u -r1.245 -r1.245.2.1 src/sys/netinet6/in6.c
cvs rdiff -u -r1.232 -r1.232.2.1 src/sys/netinet6/nd6.c
cvs rdiff -u -r1.83 -r1.83.6.1 src/sys/netinet6/nd6.h
cvs rdiff -u -r1.18 -r1.18.2.1 src/tests/net/net_common.sh
cvs rdiff -u -r1.22 -r1.22.6.1 src/tests/net/arp/t_arp.sh
cvs rdiff -u -r1.19 -r1.19.2.1 src/tests/net/ndp/t_ndp.sh
cvs rdiff -u -r1.27 -r1.27.2.1 src/tests/net/ndp/t_ra.sh
cvs rdiff -u -r1.13 -r1.13.2.1 src/tests/net/net/t_ipv6address.sh
cvs rdiff -u -r1.15 -r1.15.6.1 src/tests/net/route/t_flags.sh
cvs rdiff -u -r1.12 -r1.12.6.1 src/tests/net/route/t_flags6.sh
cvs rdiff -u -r1.12 -r1.12.4.1 src/tests/net/route/t_route.sh
cvs rdiff -u -r1.55 -r1.55.8.1 src/usr.sbin/arp/arp.c
cvs rdiff -u -r1.48 -r1.48.6.1 src/usr.sbin/ndp/ndp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: ozaki-r->mlelstv
Responsible-Changed-By: ozaki-r@NetBSD.org
Responsible-Changed-When: Tue, 05 Dec 2017 05:56:33 +0000
Responsible-Changed-Why:
I noticed now I requested a feedback to myself...
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 24 Jul 2022 05:50:06 +0000
State-Changed-Why:
5-year feedback timeout
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.