summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2012-08-12 14:24:57 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2012-08-12 14:24:57 +0000
commitc7c6ea8e8b2a50bd975445076d6537bc2ecafa3d (patch)
tree14f4b0beebff6b0b629ff6d3a24d0d13dbde63fa /usr.sbin/bgpd/rde.c
parent78ad4b4b80b601223e38d9e13929fae98ca8b20a (diff)
By default mask the reserved bits and the ext len bit in the attribute
flags field. Some systems seem to start sending bad flags around which cause session failures in bgpd. Make sure that bgpd ignores the must be zero flags correctly and ensure that they are always reset to zero when sending updates out. Reported and patch tested by Laurent CARON, OK henning@
Diffstat (limited to 'usr.sbin/bgpd/rde.c')
-rw-r--r--usr.sbin/bgpd/rde.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index cd1eb5c3c9a..8459ac67739 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.316 2012/05/27 18:52:07 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.317 2012/08/12 14:24:56 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1382,7 +1382,7 @@ rde_update_withdraw(struct rde_peer *peer, struct bgpd_addr *prefix,
} while (0)
#define CHECK_FLAGS(s, t, m) \
- (((s) & ~(ATTR_EXTLEN | (m))) == (t))
+ (((s) & ~(ATTR_DEFMASK | (m))) == (t))
int
rde_attr_parse(u_char *p, u_int16_t len, struct rde_peer *peer,