From owner-p4-projects@FreeBSD.ORG Mon Apr 14 23:36:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D8D3F1065671; Mon, 14 Apr 2008 23:36:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82D66106566C for ; Mon, 14 Apr 2008 23:36:19 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7238F8FC0C for ; Mon, 14 Apr 2008 23:36:19 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m3ENaJoB078393 for ; Mon, 14 Apr 2008 23:36:19 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m3ENaJ1o078391 for perforce@freebsd.org; Mon, 14 Apr 2008 23:36:19 GMT (envelope-from julian@freebsd.org) Date: Mon, 14 Apr 2008 23:36:19 GMT Message-Id: <200804142336.m3ENaJ1o078391@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Cc: Subject: PERFORCE change 140053 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2008 23:36:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=140053 Change 140053 by julian@julian_trafmon1 on 2008/04/14 23:36:01 match with -current Affected files ... .. //depot/projects/qingli_mpath/src/sys/net/radix_mpath.c#6 edit .. //depot/projects/qingli_mpath/src/sys/net/radix_mpath.h#4 edit .. //depot/projects/qingli_mpath/src/sys/net/route.c#7 edit Differences ... ==== //depot/projects/qingli_mpath/src/sys/net/radix_mpath.c#6 (text+ko) ==== @@ -33,6 +33,11 @@ * PROPERTIES. */ +#include +__FBSDID("$FreeBSD: src/sys/net/radix_mpath.c,v 1.3 2008/04/13 23:04:46 qingli Exp $"); + +#include "opt_inet6.h" + #include #include #include @@ -126,7 +131,7 @@ struct radix_node *t, *tt; if (!headrt || !rt) - return FALSE; + return (0); t = (struct radix_node *)headrt; tt = rn_mpath_next(t); while (tt) { @@ -135,12 +140,12 @@ tt->rn_dupedkey = NULL; tt->rn_flags &= ~RNF_ACTIVE; tt[1].rn_flags &= ~RNF_ACTIVE; - return (TRUE); + return (1); } t = tt; tt = rn_mpath_next((struct radix_node *)t); } - return (FALSE); + return (0); } /* @@ -219,7 +224,7 @@ goto different; } - maskmatched: +maskmatched: /* key/mask were the same. compare gateway for all multipaths */ do { @@ -229,23 +234,23 @@ if (rn1 == rn) continue; - if (rt1->rt_gateway->sa_family == AF_LINK) { - if (rt1->rt_ifa->ifa_addr->sa_len != rt->rt_ifa->ifa_addr->sa_len || - bcmp(rt1->rt_ifa->ifa_addr, rt->rt_ifa->ifa_addr, - rt1->rt_ifa->ifa_addr->sa_len)) - continue; - } else { - if (rt1->rt_gateway->sa_len != rt->rt_gateway->sa_len || - bcmp(rt1->rt_gateway, rt->rt_gateway, - rt1->rt_gateway->sa_len)) - continue; - } + if (rt1->rt_gateway->sa_family == AF_LINK) { + if (rt1->rt_ifa->ifa_addr->sa_len != rt->rt_ifa->ifa_addr->sa_len || + bcmp(rt1->rt_ifa->ifa_addr, rt->rt_ifa->ifa_addr, + rt1->rt_ifa->ifa_addr->sa_len)) + continue; + } else { + if (rt1->rt_gateway->sa_len != rt->rt_gateway->sa_len || + bcmp(rt1->rt_gateway, rt->rt_gateway, + rt1->rt_gateway->sa_len)) + continue; + } /* all key/mask/gateway are the same. conflicting entry. */ return EEXIST; } while ((rn1 = rn_mpath_next(rn1)) != NULL); - different: +different: return 0; } @@ -315,6 +320,7 @@ return 0; } +#ifdef INET6 int rn6_mpath_inithead(void **head, int off) { @@ -329,3 +335,4 @@ return 0; } +#endif ==== //depot/projects/qingli_mpath/src/sys/net/radix_mpath.h#4 (text+ko) ==== @@ -32,6 +32,7 @@ * BE LIABLE FOR ANY INFRINGEMENT OF ANY OTHERS' INTELLECTUAL * PROPERTIES. */ +/* $FreeBSD: src/sys/net/radix_mpath.h,v 1.1 2008/04/13 06:12:13 qingli Exp $ */ #ifndef _NET_RADIX_MPATH_H_ #define _NET_RADIX_MPATH_H_ ==== //depot/projects/qingli_mpath/src/sys/net/route.c#7 (text+ko) ==== @@ -763,6 +763,7 @@ rt->rt_flags &= ~RTF_UP; goto deldone; /* done with the RTM_DELETE command */ } + normal_rtdel: #endif /*