Hi Jacqueline,
Thanks!
Little questions:
On Mon, 26 Oct 2015, Jacqueline Yu wrote:
Thanks Martin for adding the test case, and confirming the issue. Here is a
proposed change I made with diff below as well as attached --
Appreciate any comments/feedbacks...
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 316fa5a..c424dd1 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -109,8 +109,12 @@ bgp_info_extra_free (struct bgp_info_extra **extra)
(*extra)->damp_info = NULL;
+ if ((*extra)->attr)
+ bgp_attr_unintern(&((*extra)->attr));
+
+ (*extra)->attr = NULL;
+
Is this related to the fix?
+ struct peer *peer, *log_peer = NULL;
for (ALL_LIST_ELEMENTS (bgp->peer, node, nnode, peer))
{
bgp_process_announce_selected (peer, new_select, rn, afi, safi);
+ if (log_peer == NULL)
+ log_peer = peer;
Not used?
+ if (CHECK_FLAG (old_select->flags, BGP_INFO_NEW_NHOP_INVALID))
{
{
- if (bgp_nexthop_lookup (afi, peer, ri, NULL, NULL))
- bgp_info_set_flag (rn, ri, BGP_INFO_VALID);
- else
- bgp_info_unset_flag (rn, ri, BGP_INFO_VALID);
- }
- else
+ if (bgp_nexthop_lookup (afi, peer, ri, NULL, NULL)) {
+ bgp_info_set_flag (rn, ri, BGP_INFO_VALID);
+ bgp_attr_unintern (&saved_attr);
+ bgp_info_unset_flag (rn, ri, BGP_INFO_NEW_NHOP_INVALID);
+ } else {
+ bgp_info_unset_flag (rn, ri, BGP_INFO_VALID);
+ bgp_info_set_flag (rn, ri, BGP_INFO_NEW_NHOP_INVALID);
+ if (!ri->extra)
+ ri->extra = bgp_info_extra_new();
+ else
+ if (ri->extra->attr)
+ bgp_attr_unintern(&(ri->extra->attr));
+ ri->extra->attr = saved_attr;
+ }
+ }
+ else {
bgp_info_set_flag (rn, ri, BGP_INFO_VALID);
+ bgp_attr_unintern (&saved_attr);
+ bgp_info_unset_flag (rn, ri, BGP_INFO_NEW_NHOP_INVALID);
+ }
Two things:
1. BGP_INFO_NEW_NHOP_INVALID just shadows BGP_INFO_VALID, do we need a
new flag?
2. Why the introduction of the saved attr and the fiddling around with
that? It feels like a different issue?
regards,
--
Paul Jakma [email protected] @pjakma Key ID: 64A2FF6A
Fortune:
"The Mets were great in 'sixty eight,
The Cards were fine in 'sixty nine,
But the Cubs will be heavenly in nineteen and seventy."
-- Ernie Banks
_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev