Page MenuHomeFreeBSD

Fix gateway setup for the interface routes.
ClosedPublic

Authored by melifaro on May 20 2019, 11:32 PM.
Tags
None
Referenced Files
F132471633: D20328.diff
Fri, Oct 17, 5:20 AM
Unknown Object (File)
Thu, Oct 9, 12:38 AM
Unknown Object (File)
Tue, Oct 7, 3:05 AM
Unknown Object (File)
Fri, Sep 19, 7:31 PM
Unknown Object (File)
Sep 9 2025, 12:09 PM
Unknown Object (File)
Sep 9 2025, 6:01 AM
Unknown Object (File)
Aug 19 2025, 4:08 AM
Unknown Object (File)
Aug 8 2025, 11:38 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 Not Applicable
Unit
Tests Not Applicable