summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-07-22 15:09:35 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2010-08-03 10:34:32 +0200
commit1a35a27b64ce2cbef0eb71d874fe41d9b240a2d8 (patch)
tree5916bd32b562ed0f79dfcf4f22aa47f8dd6b1a4a /nest
parent9472efaa571c44e67e24f1854bb91382977ad339 (diff)
Fixes a buffer overflow in TX code of IPv6 BGP.
Diffstat (limited to 'nest')
-rw-r--r--nest/rt-table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 8cca42a7..26769f13 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -343,7 +343,7 @@ rte_validate(rte *e)
int c;
net *n = e->net;
- if (ipa_nonzero(ipa_and(n->n.prefix, ipa_not(ipa_mkmask(n->n.pxlen)))))
+ if ((n->n.pxlen > BITS_PER_IP_ADDRESS) || !ip_is_prefix(n->n.prefix,n->n.pxlen))
{
log(L_BUG "Ignoring bogus prefix %I/%d received via %s",
n->n.prefix, n->n.pxlen, e->sender->name);