Page MenuHomeFreeBSD

Fix gateway setup for the interface routes.
ClosedPublic

Authored by melifaro on May 20 2019, 11:32 PM.
Tags
None
Referenced Files
F157877452: D20328.id57614.diff
Tue, May 26, 2:23 AM
F157876786: D20328.id57614.diff
Tue, May 26, 2:14 AM
Unknown Object (File)
Mon, May 18, 4:18 AM
Unknown Object (File)
Mon, May 18, 4:10 AM
Unknown Object (File)
Sun, May 3, 6:56 AM
Unknown Object (File)
Mon, Apr 27, 4:46 PM
Unknown Object (File)
Sun, Apr 26, 10:15 PM
Unknown Object (File)
Apr 18 2026, 3:10 AM
Subscribers

Details

Summary

Currently rinit1() and its IPv6 counterpart nd6_prefix_onlink_rtrequest() uses dummy null_sdl gateway address during route insertion and fill it afterwards. One of the original reasons might reside in the concern that sizeof(struct sockadd_dl) is rather big to be on-stack (54 bytes on amd64).
Inserting fake gateway and silently fixing it afterwards brings complications to the routing stack.

This change fixes both rinit1() and nd6_prefix_onlink_rtrequest() by filling in proper gateway prior to the inserion. It does not change any of the userland notifications as in both cases, they happen after the insertion and fixup process (rt_newaddrmsg_fib() and nd6_rtmsg())

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 24344
Build 23166: arc lint + arc unit