Exclusive net lock or mutex arp_mtx protect the llinfo_arp fields.
authorbluhm <bluhm@openbsd.org>
Tue, 25 Apr 2023 16:24:25 +0000 (16:24 +0000)
committerbluhm <bluhm@openbsd.org>
Tue, 25 Apr 2023 16:24:25 +0000 (16:24 +0000)
commit862bb2af38e9cfe353faf041b8af2686a6af6f8a
treed8d42da34024aa3e7eb11b47c10c80c0fc577071
parenteeeb5c16946871d99a69bc0b68898a51dd9b3aad
Exclusive net lock or mutex arp_mtx protect the llinfo_arp fields.
So kernel lock is only needed for changing the route rt_flags.  In
arpresolve() protect rt_llinfo lookup and llinfo_arp modification
with arp_mtx.  Grab kernel lock for rt_flags reject modification
only when needed.
Tested by Hrvoje Popovski; OK patrick@ kn@
sys/netinet/if_ether.c