summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2008-09-05 10:38:13 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2008-09-05 10:38:13 +0000
commit4409672c52d1805938cab527eee41e97b230d134 (patch)
tree62cad34232e841a4c1acb4f1f6f113349268f270
parenta96ac6c5ded4437c15a2c2025678d9048cbe0a40 (diff)
ignore unknown SAFIs in the MP capabilities. used by some to distribute
some kind of VPN stuff
-rw-r--r--usr.sbin/bgpd/session.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index 724e2c2094a..8ae17ce80ef 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.282 2008/06/26 00:01:51 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.283 2008/09/05 10:38:12 henning Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -2193,22 +2193,20 @@ parse_capabilities(struct peer *peer, u_char *d, u_int16_t dlen, u_int32_t *as)
memcpy(&mp_safi, capa_val + 3, sizeof(mp_safi));
switch (mp_afi) {
case AFI_IPv4:
- if (mp_safi < 1 || mp_safi > 3) {
+ if (mp_safi < 1 || mp_safi > 3)
log_peer_warnx(&peer->conf,
"parse_capabilities: AFI IPv4, "
- "mp_safi %u illegal", mp_safi);
- return (-1);
- }
- peer->capa.peer.mp_v4 = mp_safi;
+ "mp_safi %u unknown", mp_safi);
+ else
+ peer->capa.peer.mp_v4 = mp_safi;
break;
case AFI_IPv6:
- if (mp_safi < 1 || mp_safi > 3) {
+ if (mp_safi < 1 || mp_safi > 3)
log_peer_warnx(&peer->conf,
"parse_capabilities: AFI IPv6, "
- "mp_safi %u illegal", mp_safi);
- return (-1);
- }
- peer->capa.peer.mp_v6 = mp_safi;
+ "mp_safi %u unknown", mp_safi);
+ else
+ peer->capa.peer.mp_v6 = mp_safi;
break;
default: /* ignore */
break;