OpenBSD cvs log

created 2025-02-16T22:09:36Z
begin 2025-02-13T19:54:44Z
end 2025-02-13T21:01:34Z
path src/sys
commits 1

date 2025-02-13T21:01:34Z
author bluhm
files src/sys/net/if_gre.c log diff annotate
src/sys/net/route.c log diff annotate
src/sys/net/route.h log diff annotate
src/sys/net/rtsock.c log diff annotate
src/sys/netinet/if_ether.c log diff annotate
src/sys/netinet6/nd6.c log diff annotate
message Fix route entry race when accessing rt_gwroute.

Kassert in rt_getll() was triggered as rt_gwroute could be NULL.
Problem was introduced by shared netlock around tcp_timer_rexmt().
PMTU discovery calls rtrequest_delete() which was missing proper
locking around rt_gwroute.
As rt_getll() is called by ARP and ND6 resolve in the hot path, use
SMR to provide the pointer to rt_gwroute lockless. Reference count
of the returned route is incremented, caller has to free it.
Modifying rt_gwroute or rt_cachecnt in rt_putgwroute() is protected
by per route lock.

OK mvs@