From owner-svn-src-projects@FreeBSD.ORG Fri Feb 3 13:12:42 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBF15106566C; Fri, 3 Feb 2012 13:12:42 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6ECD8FC0A; Fri, 3 Feb 2012 13:12:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q13DCgfe088694; Fri, 3 Feb 2012 13:12:42 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q13DCgYr088692; Fri, 3 Feb 2012 13:12:42 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202031312.q13DCgYr088692@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 3 Feb 2012 13:12:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230943 - projects/multi-fibv6/head/sys/netinet/ipfw X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2012 13:12:42 -0000 Author: bz Date: Fri Feb 3 13:12:42 2012 New Revision: 230943 URL: http://svn.freebsd.org/changeset/base/230943 Log: Make ipfw verify_path6() multi-FIB aware. The "fib" and "setfib" keywords implementations need no adjustments. Sponsored by: Cisco Systems, Inc. Modified: projects/multi-fibv6/head/sys/netinet/ipfw/ip_fw2.c Modified: projects/multi-fibv6/head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- projects/multi-fibv6/head/sys/netinet/ipfw/ip_fw2.c Fri Feb 3 13:08:44 2012 (r230942) +++ projects/multi-fibv6/head/sys/netinet/ipfw/ip_fw2.c Fri Feb 3 13:12:42 2012 (r230943) @@ -496,7 +496,7 @@ search_ip6_addr_net (struct in6_addr * i } static int -verify_path6(struct in6_addr *src, struct ifnet *ifp) +verify_path6(struct in6_addr *src, struct ifnet *ifp, u_int fib) { struct route_in6 ro; struct sockaddr_in6 *dst; @@ -507,9 +507,8 @@ verify_path6(struct in6_addr *src, struc dst->sin6_family = AF_INET6; dst->sin6_len = sizeof(*dst); dst->sin6_addr = *src; - /* XXX MRT 0 for ipv6 at this time */ - rtalloc_ign((struct route *)&ro, 0); + in6_rtalloc_ign(&ro, 0, fib); if (ro.ro_rt == NULL) return 0; @@ -1701,7 +1700,7 @@ do { \ #ifdef INET6 is_ipv6 ? verify_path6(&(args->f_id.src_ip6), - m->m_pkthdr.rcvif) : + m->m_pkthdr.rcvif, args->f_id.fib) : #endif verify_path(src_ip, m->m_pkthdr.rcvif, args->f_id.fib))); @@ -1713,7 +1712,7 @@ do { \ #ifdef INET6 is_ipv6 ? verify_path6(&(args->f_id.src_ip6), - NULL) : + NULL, args->f_id.fib) : #endif verify_path(src_ip, NULL, args->f_id.fib))); break; @@ -1731,7 +1730,8 @@ do { \ #ifdef INET6 is_ipv6 ? verify_path6( &(args->f_id.src_ip6), - m->m_pkthdr.rcvif) : + m->m_pkthdr.rcvif, + args->f_id.fib) : #endif verify_path(src_ip, m->m_pkthdr.rcvif,