diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2014-06-04 00:59:01 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2014-06-29 12:47:21 +0200 |
commit | 27bf90a14670283a899b96c56dd23f8413e0973e (patch) | |
tree | e52498c5d70f6efef4d9a827b6974a2f597b2e30 /lib/queue.h | |
parent | 73d78ea0153fd36a300be5fec2ef0fca34a67477 (diff) | |
download | quagga-27bf90a14670283a899b96c56dd23f8413e0973e.tar.bz2 quagga-27bf90a14670283a899b96c56dd23f8413e0973e.tar.xz |
bgpd: fix double free after extcommunity set (BZ#799)
The route-map extcommunity set code was incorrectly assuming that it
owns the intern'd struct ecommunity reference. In reality, the intern'd
reference belongs to bgp_update_receive() and we're not supposed to
touch it in the route-map code.
Instead, like all the other set commands, we use a on-heap but
non-intern'd ecommunity to set the new value. This is then either
intern'd in bgp_update_main/_rsclient() through bgp_attr_intern(), or
free'd through bgp_attr_flush().
This fixes Bugzilla #799, which is that bgpd otherwise crashes with a
double free. The ecommunity got unintern'd first in the route-map set
command, then in bgp_update_receive().
Debugged-by: Milan Kocian <milon@wq.cz>
Reported-by: Florian S <florian@herrenlohe.de>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/queue.h')
0 files changed, 0 insertions, 0 deletions