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
Unknown Object (File)
Dec 19 2023, 8:54 PM
Unknown Object (File)
Nov 30 2023, 7:13 AM
Unknown Object (File)
Nov 11 2023, 11:25 AM
Unknown Object (File)
Nov 9 2023, 11:26 AM
Unknown Object (File)
Nov 8 2023, 4:00 PM
Unknown Object (File)
Nov 6 2023, 7:24 PM
Unknown Object (File)
Nov 6 2023, 5:57 PM
Unknown Object (File)
Nov 1 2023, 7:08 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 ↗(On Diff #788)

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 ↗(On Diff #788)

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.