From f8523e2fc5b88c59f2a0ead91c3f1086d6606442 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Wed, 21 Sep 2005 13:35:04 +0000 Subject: Make sure that "updates" with only MP withdraws (MP_UNREACH_NRLI) stop processing after the MP withdraw block. OK henning@ --- usr.sbin/bgpd/rde.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'usr.sbin/bgpd') diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index a32d4429ef6..95d1082ed31 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.172 2005/09/20 14:40:32 henning Exp $ */ +/* $OpenBSD: rde.c,v 1.173 2005/09/21 13:35:03 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -704,7 +704,8 @@ rde_update_dispatch(struct imsg *imsg) log_peer_warnx(&peer->conf, "bad AFI, IPv4 disabled"); rde_update_err(peer, ERR_UPDATE, ERR_UPD_OPTATTR, NULL, 0); - path_put(asp); + if (attrpath_len != 0) + path_put(asp); return (-1); } @@ -778,6 +779,11 @@ rde_update_dispatch(struct imsg *imsg) /* silently ignore unsupported multiprotocol AF */ break; } + + if ((asp->flags & ~F_ATTR_MP_UNREACH) == 0) { + path_put(asp); + return (0); + } } /* shift to NLRI information */ -- cgit v1.2.3