PERFORCE change 140053 for review

Julian Elischer julian at FreeBSD.org
Mon Apr 14 23:36:20 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=140053

Change 140053 by julian at 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 <sys/cdefs.h>
+__FBSDID("$FreeBSD: src/sys/net/radix_mpath.c,v 1.3 2008/04/13 23:04:46 qingli Exp $");
+
+#include "opt_inet6.h"
+
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/malloc.h>
@@ -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
 		/*


More information about the p4-projects mailing list