summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_attr.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2004-05-07 10:06:16 +0000
committerDamien Miller <djm@cvs.openbsd.org>2004-05-07 10:06:16 +0000
commit9a4f2d19b47fbe77d0a24efbd5e0d99f6a1d9c8a (patch)
treeb6c4b9d1d8ba0dba667bb4f03ad32f50d06e17ea /usr.sbin/bgpd/rde_attr.c
parent15f9051f68346cfbfe2366a9a7be3019cbeaf257 (diff)
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
Diffstat (limited to 'usr.sbin/bgpd/rde_attr.c')
-rw-r--r--usr.sbin/bgpd/rde_attr.c6
1 files changed, 4 insertions, 2 deletions
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 <claudio@openbsd.org>
@@ -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)