freebsd-dev/usr.sbin/arp
Alexander V. Chernikov f9e1cd6c99 Fix arp/ndp deletion broken by 2fe5a79425.
Changes in the 2fe5a79425 moved dst sockaddr masking from the
 routing control plane to the rtsock code.

It broke arp/ndp deletion.
It turns out, arp/ndp perform RTM_GET request first to get an
 interface index necessary for the deletion.
Then they simply stamp the reply with RTF_LLDATA and set the
 command to RTM_DELETE.
As a result, kernel receives request with non-empty RTA_NETMASK
 and clears RTA_DST host bits before passing the message to the
 lla code.

De facto, the only needed bits are RTA_DST, RTA_GATEWAY and the
 subset of rtm_flags.

With that in mind, fix the interace by clearing RTA_NETMASK
 for every messages with RTF_LLDATA.

While here, cleanup arp/ndp code a bit.

MFC after:	1 day
Reviewed by:	gnn
Differential Revision:	https://reviews.freebsd.org/D28804
2021-02-19 21:17:17 +00:00
..
arp.4 Bump amount of queued packets in for unresolved ARP/NDP entries to 16. 2021-01-11 19:51:11 +00:00
arp.8 arp(8) clarify the use of the '-a flag' 2020-07-13 15:06:29 +00:00
arp.c Fix arp/ndp deletion broken by 2fe5a79425. 2021-02-19 21:17:17 +00:00
Makefile
Makefile.depend