Page MenuHomeFreeBSD

Make in_localip_more() fib-aware.
ClosedPublic

Authored by melifaro on Feb 14 2021, 11:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 21, 4:10 PM
Unknown Object (File)
Mon, Oct 21, 4:04 PM
Unknown Object (File)
Mon, Oct 21, 3:59 PM
Unknown Object (File)
Oct 2 2024, 4:01 PM
Unknown Object (File)
Sep 28 2024, 10:12 PM
Unknown Object (File)
Sep 18 2024, 7:20 AM
Unknown Object (File)
Sep 18 2024, 4:46 AM
Unknown Object (File)
Sep 13 2024, 10:17 PM
Subscribers

Details

Summary

This change fixes route installation for the interfaces in the different fibs using the same prefix.

Test Plan
23:29 [0] m@devel2 s ifconfig tap0 create
23:29 [0] m@devel2 s ifconfig tap1 create
23:29 [0] m@devel2 s ifconfig tap1 fib 3
23:30 [0] m@devel2 s ifconfig tap0 fib 2
23:30 [0] m@devel2 s ifconfig tap0 192.0.2.2/24
23:30 [0] m@devel2 s ifconfig tap1 192.0.2.2/24
23:30 [0] m@devel2
23:30 [0] m@devel2 setfib 2 netstat -4rn
Routing tables (fib: 2)

Internet:
Destination        Gateway            Flags     Netif Expire
127.0.0.1          link#2             UHS         lo0
192.0.2.0/24       link#3             U          tap0
192.0.2.2          link#3             UHS         lo0
23:30 [0] m@devel2
23:30 [0] m@devel2 setfib 3 netstat -4rn
Routing tables (fib: 3)

Internet:
Destination        Gateway            Flags     Netif Expire
192.0.2.0/24       link#4             U          tap1
192.0.2.2          link#4             UHS         lo0
23:37 [1] m@devel2 s ifconfig tap1 -alias 192.0.2.2
23:38 [1] m@devel2 setfib 3 netstat -4rn
Routing tables (fib: 3)
23:38 [1] m@devel2 setfib 2 netstat -4rn
Routing tables (fib: 2)

Internet:
Destination        Gateway            Flags     Netif Expire
127.0.0.1          link#2             UHS         lo0
192.0.2.0/24       link#3             U          tap0
192.0.2.2          link#3             UHS         lo0

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

melifaro added a reviewer: network.
donner added inline comments.
sys/netinet/in.c
175

Are you comparing pointers (it_addr vs in) or content?

melifaro edited the test plan for this revision. (Show Details)

Reflect comments.

sys/netinet/in.c
175

No, but in and it were indeed easy to mix up.
Renamed variables, so it should be easier to read.

This revision is now accepted and ready to land.Feb 16 2021, 8:10 AM
This revision was automatically updated to reflect the committed changes.