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)
Sat, Mar 2, 11:29 PM
Unknown Object (File)
Feb 13 2024, 1:12 PM
Unknown Object (File)
Jan 12 2024, 9:19 PM
Unknown Object (File)
Dec 31 2023, 12:19 PM
Unknown Object (File)
Dec 22 2023, 10:53 PM
Unknown Object (File)
Dec 20 2023, 2:09 AM
Unknown Object (File)
Dec 12 2023, 1:15 PM
Unknown Object (File)
Nov 11 2023, 1:04 AM
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.