diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-07-22 15:09:35 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-07-22 15:09:35 +0200 |
commit | 852b7062e33b9886eb869fac8b9354497c49b126 (patch) | |
tree | acdd88ced9d2e223241be82c063f34a03f0c7ae0 /nest/rt-table.c | |
parent | 7873e9828ff7ba7203fd30ffa7d50859d583d4ca (diff) | |
download | bird-852b7062e33b9886eb869fac8b9354497c49b126.tar bird-852b7062e33b9886eb869fac8b9354497c49b126.zip |
Fixes a buffer overflow in TX code of IPv6 BGP.
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r-- | nest/rt-table.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c index b525694..f40cc80 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -354,7 +354,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); |