svn commit: r232575 - projects/multi-fibv6/7/sys/contrib/pf/net
Bjoern A. Zeeb
bz at FreeBSD.org
Mon Mar 5 22:36:51 UTC 2012
Author: bz
Date: Mon Mar 5 22:36:50 2012
New Revision: 232575
URL: http://svn.freebsd.org/changeset/base/232575
Log:
Adjust rtalloc_ign() calls for multi-FIBv6 though not really supported.
Use RT_DEFAULT_FIB rather than a magic 0 also for IPv4.
Sponsored by: Cisco Systems, Inc.
Modified:
projects/multi-fibv6/7/sys/contrib/pf/net/pf.c
Modified: projects/multi-fibv6/7/sys/contrib/pf/net/pf.c
==============================================================================
--- projects/multi-fibv6/7/sys/contrib/pf/net/pf.c Mon Mar 5 20:59:34 2012 (r232574)
+++ projects/multi-fibv6/7/sys/contrib/pf/net/pf.c Mon Mar 5 22:36:50 2012 (r232575)
@@ -3201,7 +3201,7 @@ pf_calc_mss(struct pf_addr *addr, sa_fam
#ifdef RTF_PRCLONING
rtalloc_ign(&ro, (RTF_CLONING | RTF_PRCLONING));
#else /* !RTF_PRCLONING */
- in_rtalloc_ign(&ro, RTF_CLONING, 0);
+ in_rtalloc_ign(&ro, RTF_CLONING, RT_DEFAULT_FIB);
#endif
#else /* ! __FreeBSD__ */
rtalloc_noclone(&ro, NO_CLONING);
@@ -3222,7 +3222,7 @@ pf_calc_mss(struct pf_addr *addr, sa_fam
rtalloc_ign((struct route *)&ro6,
(RTF_CLONING | RTF_PRCLONING));
#else /* !RTF_PRCLONING */
- rtalloc_ign((struct route *)&ro6, RTF_CLONING);
+ in6_rtalloc_ign(&ro6, RTF_CLONING, RT_DEFAULT_FIB);
#endif
#else /* ! __FreeBSD__ */
rtalloc_noclone((struct route *)&ro6, NO_CLONING);
@@ -6135,9 +6135,10 @@ pf_routable(struct pf_addr *addr, sa_fam
#ifdef __FreeBSD__
/* XXX MRT not always INET */ /* stick with table 0 though */
if (af == AF_INET)
- in_rtalloc_ign((struct route *)&ro, RTF_CLONING, 0);
+ in_rtalloc_ign((struct route *)&ro, RTF_CLONING,
+ RT_DEFAULT_FIB);
else
- rtalloc_ign((struct route *)&ro, RTF_CLONING);
+ in6_rtalloc_ign(&ro, RTF_CLONING, RT_DEFAULT_FIB);
#else /* ! __FreeBSD__ */
rtalloc_noclone((struct route *)&ro, NO_CLONING);
#endif
@@ -6217,9 +6218,12 @@ pf_rtlabel_match(struct pf_addr *addr, s
rtalloc_ign((struct route *)&ro, (RTF_CLONING|RTF_PRCLONING));
# else /* !RTF_PRCLONING */
if (af == AF_INET)
- in_rtalloc_ign((struct route *)&ro, RTF_CLONING, 0);
+ in_rtalloc_ign((struct route *)&ro, RTF_CLONING,
+ RT_DEFAULT_FIB);
+#ifdef INET6
else
- rtalloc_ign((struct route *)&ro, RTF_CLONING);
+ in6_rtalloc_ign(&ro, RTF_CLONING, RT_DEFAULT_FIB);
+#endif
# endif
#else /* ! __FreeBSD__ */
rtalloc_noclone((struct route *)&ro, NO_CLONING);
@@ -6299,7 +6303,7 @@ pf_route(struct mbuf **m, struct pf_rule
dst->sin_addr = ip->ip_dst;
if (r->rt == PF_FASTROUTE) {
- in_rtalloc(ro, 0);
+ in_rtalloc(ro, RT_DEFAULT_FIB);
if (ro->ro_rt == 0) {
ipstat.ips_noroute++;
goto bad;
More information about the svn-src-projects
mailing list