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)
Tue, Dec 10, 11:39 PM
Unknown Object (File)
Wed, Dec 4, 2:45 PM
Unknown Object (File)
Sun, Dec 1, 5:16 AM
Unknown Object (File)
Wed, Nov 27, 8:08 AM
Unknown Object (File)
Wed, Nov 27, 2:53 AM
Unknown Object (File)
Tue, Nov 26, 10:06 PM
Unknown Object (File)
Nov 18 2024, 12:50 AM
Unknown Object (File)
Nov 17 2024, 4:49 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.