Page MenuHomeFreeBSD

Make in_localip_more() fib-aware.
ClosedPublic

Authored by melifaro on Sun, Feb 14, 11:36 PM.

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
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

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

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
174

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.Tue, Feb 16, 8:10 AM
This revision was automatically updated to reflect the committed changes.