Page MenuHomeFreeBSD

Remove backwards compatible versions of ifa_ifwithnet and friends
ClosedPublic

Authored by asomers on Jul 21 2014, 4:57 PM.
Tags
None
Referenced Files
F105987846: D458.diff
Mon, Dec 23, 12:50 PM
Unknown Object (File)
Sat, Dec 14, 3:46 AM
Unknown Object (File)
Thu, Dec 12, 1:29 AM
Unknown Object (File)
Fri, Dec 6, 1:24 AM
Unknown Object (File)
Thu, Nov 28, 12:53 PM
Unknown Object (File)
Thu, Nov 28, 12:53 PM
Unknown Object (File)
Thu, Nov 28, 12:53 PM
Unknown Object (File)
Thu, Nov 28, 12:33 PM
Subscribers

Details

Reviewers
hrs
glebius
Summary

Revisions 264905 and 266860 added a "int fib" argument to
ifa_ifwithnet and ifa_ifwithdstaddr. For the sake of backwards compatibility,
the new arguments were added to new functions named ifa_ifwithnet_fib and
ifa_ifwithdstaddr_fib, while the old functions became wrappers around the new
ones that passed RT_ALL_FIBS for the fib argument. However, the backwards
compatibility is not desired for FreeBSD 11, because there are numerous other
incompatible changes to the ifnet(9) API. We therefore decided to remove it
from head but leave it in place for stable/9 and stable/10. In addition, this
commit adds the fib argument to ifa_ifwithbroadaddr for consistency's sake.

Test Plan

No functional change is intended. The current behavior can be
tested by the sys/netinet/fibs_test ATF test.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

asomers retitled this revision from to Remove backwards compatible versions of ifa_ifwithnet and friends.
asomers updated this object.
asomers edited the test plan for this revision. (Show Details)
asomers added reviewers: glebius, hrs.
asomers added a subscriber: melifaro.

Please bump __FreeBSD_version in sys/sys/param.h, too.

share/man/man9/ifnet.9
1401

This line should be:

is
.Dv RT_ALL_FIBS ,

then ....

sys/net/if_var.h
506

Is there any specific reason to use u_int for fibnum?

asomers edited edge metadata.

bump __FreeBSD_version and address HRS's comment re RT_ALL_FIBS in ifnet(9)

sys/net/if_var.h
506

Just because that's the way that its always been, going all the way back to when ifa_ifwithroute_fib was first added in r178888. Just guessing, Julian probably did that because the radix table lower down the stack will panic if fib < 0. Also, the upstack code that calls ifa_ifwithroute_fib all passes u_int's for the fibnum.

glebius edited edge metadata.
This revision is now accepted and ready to land.Sep 11 2014, 5:51 AM
hrs edited edge metadata.