[bgpd] bug #398 Bogus free on out route-map, and assert() with rsclients
commit9eda90ce8094683a5315007fbd0f9249a284f36f
authorPaul Jakma <paul.jakma@sun.com>
Thu, 30 Aug 2007 13:36:17 +0000 (30 13:36 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Thu, 30 Aug 2007 13:36:17 +0000 (30 13:36 +0000)
tree1d861050148c03dc4c37a1266c4567b24e9e6da1
parent6d134fb4defecb16591adbf4acb020acd165a75a
[bgpd] bug #398 Bogus free on out route-map, and assert() with rsclients

2007-08-27 Paul Jakma <paul.jakma@sun.com>

* bgp_route.c: (bgp_announce_check) Fix bug #398, slight
  modification of Vladimir Ivanov's suggested fix - to keep
  memory alloc conditional.
  (bgp_process_announce_selected) Don't take struct attr as
  argument, none of the callers need it and it needlessly
  distances allocation from use.
  Free the extended attr, the attr itself is on the stack.
  Fix bad indentation.
* bgp_attr.c: (bgp_packet_attribute) Remove incorrect assert,
  and adjust conditional to test attr->extra, diagnosis by
  Vladimir Ivanov in bug #398.

2007-08-27 Vladimir Ivanov <wawa@yandex-team.ru>

* bgp_route.c: (bgp_announce_check_rsclient) copy of
  ri->attr is no longer deep enough, due to addition of
  attr->extra. It should use bgp_attr_dup, as
  bgp_announce_check() does.
bgpd/ChangeLog
bgpd/bgp_attr.c
bgpd/bgp_route.c