]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix outgoing TCP/UDP packet drop on arp/ndp entry expiration.
authormelifaro <melifaro@FreeBSD.org>
Sat, 17 Mar 2018 17:05:48 +0000 (17:05 +0000)
committermelifaro <melifaro@FreeBSD.org>
Sat, 17 Mar 2018 17:05:48 +0000 (17:05 +0000)
commit7bb5ee0db4f98451224121024ee1fce806266db5
tree7abc6de4a70666a6629595375ac76e2bcc83c28d
parentbf523f13ef5a3a6d06e76be0df100ac13b0d1d11
Fix outgoing TCP/UDP packet drop on arp/ndp entry expiration.

Current arp/nd code relies on the feedback from the datapath indicating
 that the entry is still used. This mechanism is incorporated into the
 arpresolve()/nd6_resolve() routines. After the inpcb route cache
 introduction, the packet path for the locally-originated packets changed,
 passing cached lle pointer to the ether_output() directly. This resulted
 in the arp/ndp entry expire each time exactly after the configured max_age
 interval. During the small window between the ARP/NDP request and reply
 from the router, most of the packets got lost.

Fix this behaviour by plugging datapath notification code to the packet
 path used by route cache. Unify the notification code by using single
 inlined function with the per-AF callbacks.

Reported by: sthaug at nethelp.no
Reviewed by: ae
MFC after: 2 weeks
sys/net/if_ethersubr.c
sys/net/if_llatbl.h
sys/netinet/if_ether.c
sys/netinet/in.c
sys/netinet6/in6.c