Date: Fri, 24 Feb 2012 20:42:48 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r232131 - projects/multi-fibv6/8/sys/netinet6 Message-ID: <201202242042.q1OKgmC7083121@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Fri Feb 24 20:42:47 2012 New Revision: 232131 URL: http://svn.freebsd.org/changeset/base/232131 Log: MFC r232127: In selectroute() add a missing fibnum argument to an in6_rtalloc() call in an #if 0 section. In in6_selecthlim() optimize a case where in6p cannot be NULL due to an earlier check. More consistently use u_int instead of int for fibnum function arguments. Sponsored by: Cisco Systems, Inc. Modified: projects/multi-fibv6/8/sys/netinet6/in6_src.c projects/multi-fibv6/8/sys/netinet6/ip6_output.c projects/multi-fibv6/8/sys/netinet6/ip6_var.h Modified: projects/multi-fibv6/8/sys/netinet6/in6_src.c ============================================================================== --- projects/multi-fibv6/8/sys/netinet6/in6_src.c Fri Feb 24 20:40:45 2012 (r232130) +++ projects/multi-fibv6/8/sys/netinet6/in6_src.c Fri Feb 24 20:42:47 2012 (r232131) @@ -129,10 +129,10 @@ VNET_DEFINE(int, ip6_prefer_tempaddr) = static int selectroute __P((struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, - struct rtentry **, int, int)); + struct rtentry **, int, u_int)); static int in6_selectif __P((struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *ro, struct ifnet **, - struct ifnet *, int)); + struct ifnet *, u_int)); static struct in6_addrpolicy *lookup_addrsel_policy(struct sockaddr_in6 *); @@ -518,7 +518,7 @@ in6_selectsrc(struct sockaddr_in6 *dstso static int selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, struct ip6_moptions *mopts, struct route_in6 *ro, - struct ifnet **retifp, struct rtentry **retrt, int norouteok, int fibnum) + struct ifnet **retifp, struct rtentry **retrt, int norouteok, u_int fibnum) { int error = 0; struct ifnet *ifp = NULL; @@ -630,7 +630,7 @@ selectroute(struct sockaddr_in6 *dstsock *satosin6(&ron->ro_dst) = *sin6_next; } if (ron->ro_rt == NULL) { - in6_rtalloc(ron); /* multi path case? */ + in6_rtalloc(ron, fibnum); /* multi path case? */ if (ron->ro_rt == NULL || !(ron->ro_rt->rt_flags & RTF_LLINFO)) { if (ron->ro_rt) { @@ -761,7 +761,7 @@ selectroute(struct sockaddr_in6 *dstsock static int in6_selectif(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, struct ip6_moptions *mopts, struct route_in6 *ro, struct ifnet **retifp, - struct ifnet *oifp, int fibnum) + struct ifnet *oifp, u_int fibnum) { int error; struct route_in6 sro; @@ -836,7 +836,7 @@ in6_selectroute(struct sockaddr_in6 *dst int in6_selectroute_fib(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, struct ip6_moptions *mopts, struct route_in6 *ro, - struct ifnet **retifp, struct rtentry **retrt, int fibnum) + struct ifnet **retifp, struct rtentry **retrt, u_int fibnum) { return (selectroute(dstsock, opts, mopts, ro, retifp, @@ -867,8 +867,7 @@ in6_selecthlim(struct inpcb *in6p, struc ro6.ro_dst.sin6_family = AF_INET6; ro6.ro_dst.sin6_len = sizeof(struct sockaddr_in6); ro6.ro_dst.sin6_addr = in6p->in6p_faddr; - in6_rtalloc(&ro6, in6p ? in6p->inp_inc.inc_fibnum : - RT_DEFAULT_FIB); + in6_rtalloc(&ro6, in6p->inp_inc.inc_fibnum); if (ro6.ro_rt) { lifp = ro6.ro_rt->rt_ifp; RTFREE(ro6.ro_rt); Modified: projects/multi-fibv6/8/sys/netinet6/ip6_output.c ============================================================================== --- projects/multi-fibv6/8/sys/netinet6/ip6_output.c Fri Feb 24 20:40:45 2012 (r232130) +++ projects/multi-fibv6/8/sys/netinet6/ip6_output.c Fri Feb 24 20:42:47 2012 (r232131) @@ -135,7 +135,7 @@ static int ip6_insertfraghdr __P((struct static int ip6_insert_jumboopt(struct ip6_exthdrs *, u_int32_t); static int ip6_splithdr(struct mbuf *, struct ip6_exthdrs *); static int ip6_getpmtu __P((struct route_in6 *, struct route_in6 *, - struct ifnet *, struct in6_addr *, u_long *, int *, int)); + struct ifnet *, struct in6_addr *, u_long *, int *, u_int)); static int copypktopts(struct ip6_pktopts *, struct ip6_pktopts *, int); @@ -1267,7 +1267,7 @@ ip6_insertfraghdr(struct mbuf *m0, struc static int ip6_getpmtu(struct route_in6 *ro_pmtu, struct route_in6 *ro, struct ifnet *ifp, struct in6_addr *dst, u_long *mtup, - int *alwaysfragp, int fibnum) + int *alwaysfragp, u_int fibnum) { u_int32_t mtu = 0; int alwaysfrag = 0; Modified: projects/multi-fibv6/8/sys/netinet6/ip6_var.h ============================================================================== --- projects/multi-fibv6/8/sys/netinet6/ip6_var.h Fri Feb 24 20:40:45 2012 (r232130) +++ projects/multi-fibv6/8/sys/netinet6/ip6_var.h Fri Feb 24 20:42:47 2012 (r232131) @@ -439,7 +439,7 @@ int in6_selectroute __P((struct sockaddr struct rtentry **)); int in6_selectroute_fib(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, - struct rtentry **, int); + struct rtentry **, u_int); u_int32_t ip6_randomid __P((void)); u_int32_t ip6_randomflowlabel __P((void)); #endif /* _KERNEL */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202242042.q1OKgmC7083121>