aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/in_pcb.c
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2014-09-11 20:21:03 +0000
committerAlan Somers <asomers@FreeBSD.org>2014-09-11 20:21:03 +0000
commit4f8585e021ec9c2190932c2890dc0960999e4591 (patch)
tree71b9208dfb55df9be34d49b1987c426f39a452cb /sys/netinet/in_pcb.c
parent0686a20b8a0e7a18faaae792a189f9e7a9aabf62 (diff)
downloadsrc-4f8585e021ec9c2190932c2890dc0960999e4591.tar.gz
src-4f8585e021ec9c2190932c2890dc0960999e4591.zip
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. sys/sys/param.h Increment __FreeBSD_version sys/net/if.c sys/net/if_var.h sys/net/route.c Add fibnum argument to ifa_ifwithbroadaddr, and remove the _fib versions of ifa_ifwithdstaddr, ifa_ifwithnet, and ifa_ifwithroute. sys/net/route.c sys/net/rtsock.c sys/netinet/in_pcb.c sys/netinet/ip_options.c sys/netinet/ip_output.c sys/netinet6/nd6.c Fixup calls of modified functions. share/man/man9/ifnet.9 Document changed API. CR: https://reviews.freebsd.org/D458 MFC after: Never Sponsored by: Spectra Logic
Notes
Notes: svn path=/head/; revision=271438
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r--sys/netinet/in_pcb.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 32d2d05cda88..4af57dc2ae56 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -792,9 +792,11 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr,
struct in_ifaddr *ia;
struct ifnet *ifp;
- ia = ifatoia(ifa_ifwithdstaddr((struct sockaddr *)sin));
+ ia = ifatoia(ifa_ifwithdstaddr((struct sockaddr *)sin,
+ RT_ALL_FIBS));
if (ia == NULL)
- ia = ifatoia(ifa_ifwithnet((struct sockaddr *)sin, 0));
+ ia = ifatoia(ifa_ifwithnet((struct sockaddr *)sin, 0,
+ RT_ALL_FIBS));
if (ia == NULL) {
error = ENETUNREACH;
goto done;
@@ -909,9 +911,10 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr,
sain.sin_len = sizeof(struct sockaddr_in);
sain.sin_addr.s_addr = faddr->s_addr;
- ia = ifatoia(ifa_ifwithdstaddr(sintosa(&sain)));
+ ia = ifatoia(ifa_ifwithdstaddr(sintosa(&sain), RT_ALL_FIBS));
if (ia == NULL)
- ia = ifatoia(ifa_ifwithnet(sintosa(&sain), 0));
+ ia = ifatoia(ifa_ifwithnet(sintosa(&sain), 0,
+ RT_ALL_FIBS));
if (ia == NULL)
ia = ifatoia(ifa_ifwithaddr(sintosa(&sain)));