summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2005-08-10 08:34:07 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2005-08-10 08:34:07 +0000
commit5880db9fd4879245236af7d488336e9e2313b4fa (patch)
tree4f972828d1d21fbceb0166af40b4d6be9e8c4a6f /usr.sbin/bgpd/rde.c
parent590b5f3b7041069f1a53ccf599beaf010f13b07f (diff)
Pass the correct peer to rde_apply_set(). rde_apply_set() needs to know
the peer where the prefix came from so that prepend-neighbor works. Extend rde_filter() and make sure that the correct peer is passed. Until now most cases resulted in a NULL peer causing a nasty crash that was found by David Ulevitch. OK henning@
Diffstat (limited to 'usr.sbin/bgpd/rde.c')
-rw-r--r--usr.sbin/bgpd/rde.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index 5647fa86ae5..e9a6210038c 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.168 2005/07/29 22:26:30 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.169 2005/08/10 08:34:06 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -706,7 +706,7 @@ rde_update_dispatch(struct imsg *imsg)
}
/* input filter */
- if (rde_filter(peer, NULL, &prefix, prefixlen,
+ if (rde_filter(peer, NULL, &prefix, prefixlen, peer,
DIR_IN) == ACTION_DENY)
continue;
@@ -763,7 +763,7 @@ rde_update_dispatch(struct imsg *imsg)
/* input filter */
if (rde_filter(peer, NULL, &prefix, prefixlen,
- DIR_IN) == ACTION_DENY)
+ peer, DIR_IN) == ACTION_DENY)
continue;
rde_update_log("withdraw", peer, NULL,
@@ -825,7 +825,7 @@ rde_update_dispatch(struct imsg *imsg)
*/
fasp = path_copy(asp);
/* input filter */
- if (rde_filter(peer, fasp, &prefix, prefixlen,
+ if (rde_filter(peer, fasp, &prefix, prefixlen, peer,
DIR_IN) == ACTION_DENY) {
path_put(fasp);
continue;
@@ -909,8 +909,8 @@ rde_update_dispatch(struct imsg *imsg)
fasp = path_copy(asp);
/* input filter */
- if (rde_filter(peer, fasp, &prefix,
- prefixlen, DIR_IN) == ACTION_DENY) {
+ if (rde_filter(peer, fasp, &prefix, prefixlen,
+ peer, DIR_IN) == ACTION_DENY) {
path_put(fasp);
continue;
}