From 9a4f2d19b47fbe77d0a24efbd5e0d99f6a1d9c8a Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 7 May 2004 10:06:16 +0000 Subject: add a filter option to dump prefixes learned in UPDATEs into a PF table, intended for building realtime BGP blacklists (e.g. with spamd); ok claudio & henning --- usr.sbin/bgpd/rde_attr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.sbin/bgpd/rde_attr.c') diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c index d669caad4e1..8ec8450c942 100644 --- a/usr.sbin/bgpd/rde_attr.c +++ b/usr.sbin/bgpd/rde_attr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_attr.c,v 1.28 2004/04/30 05:47:50 deraadt Exp $ */ +/* $OpenBSD: rde_attr.c,v 1.29 2004/05/07 10:06:15 djm Exp $ */ /* * Copyright (c) 2004 Claudio Jeker @@ -354,7 +354,9 @@ attr_compare(struct attr_flags *a, struct attr_flags *b) return (1); if (a->lpref < b->lpref) return (-1); - r = aspath_compare(a->aspath, b->aspath); + r = strcmp(a->pftable, b->pftable); + if (r == 0) + r = aspath_compare(a->aspath, b->aspath); if (r > 0) return (1); if (r < 0) -- cgit v1.2.3