--- ./bgpd/rde_decide.c.dist	Wed Jan 10 08:56:49 2007
+++ ./bgpd/rde_decide.c	Tue Jan  9 20:05:33 2007
@@ -144,7 +144,7 @@
 
 	/* 5. MED decision, only comparable between the same neighboring AS */
 	if (rde_decisionflags() & BGPD_FLAG_DECISION_MED_ALWAYS ||
-	    aspath_neighbor(asp1->aspath) == aspath_neighbor(asp2->aspath))
+	    aspath_neighbor(asp1->aspath,4) == aspath_neighbor(asp2->aspath,4))
 		/* lowest value wins */
 		if ((asp2->med - asp1->med) != 0)
 			return (asp2->med - asp1->med);
