[client] Use unique sequence numbers for bsd routes (#4081)

updates the route manager on Unix to use a unique, incrementing sequence number for each route message instead of a fixed value.

Replace the static Seq: 1 with a call to r.getSeq()
Add an atomic seq field and the getSeq method in SysOps
This commit is contained in:
Viktor Liu
2025-07-03 09:02:53 +02:00
committed by GitHub
parent 2c81cf2c1e
commit 9afbecb7ac
2 changed files with 10 additions and 1 deletions

View File

@@ -108,7 +108,7 @@ func (r *SysOps) buildRouteMessage(action int, prefix netip.Prefix, nexthop Next
Type: action,
Flags: unix.RTF_UP,
Version: unix.RTM_VERSION,
Seq: 1,
Seq: r.getSeq(),
}
const numAddrs = unix.RTAX_NETMASK + 1