]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix route flags update during RTM_CHANGE.
authormelifaro <melifaro@FreeBSD.org>
Sun, 4 Oct 2020 13:24:58 +0000 (13:24 +0000)
committermelifaro <melifaro@FreeBSD.org>
Sun, 4 Oct 2020 13:24:58 +0000 (13:24 +0000)
commitcd0149b3b0eafc710a154bb7a5902bb46e5e80c2
treefb0de2f6973a1b76bdd5e6f17194ab106c55d1b6
parent62a9018a8878533432500e5cb89f9bd07fd9ef14
Fix route flags update during RTM_CHANGE.
Nexthop lookup was not consireding rt_flags when doing
 structure comparison, which lead to an original nexthop
 selection when changing flags. Fix the case by adding
 rt_flags field into comparison and rearranging nhop_priv
 fields to allow for efficient matching.
Fix `route change X/Y flags` case - recent changes
 disallowed specifying RTF_GATEWAY flag without actual gateway.
 It turns out, route(8) fills in RTF_GATEWAY by default, unless
 -interface flag is specified. Fix regression by clearing
 RTF_GATEWAY flag instead of failing.
Fix route flag reporting in RTM_CHANGE messages by explicitly
 updating rtm_flags after operation competion.
Add IPv4/IPv6 tests for flag-only route changes.
sys/net/route/nhop_ctl.c
sys/net/route/nhop_var.h
sys/net/route/route_ctl.c
sys/net/rtsock.c
tests/sys/net/routing/test_rtsock_l3.c