
jorge at dti2
May 8, 2012, 3:12 AM
Post #3 of 3
(197 views)
Permalink
|
|
Re: [PATCH 14/25] bgpd: bgp_attr_default_set() already allocates a struct attr_extra
[In reply to]
|
|
El 07/05/2012 20:18, Paul Jakma escribió: > Hmm, my tendency'd be to NACK this. > > Access to the extra attributes should be obviously safe from local inspection of > code. This weakens that obviousness, and the call to bgp_attr_extra_get is > hardly performance critical here. > I was checking and removing superfluous calls to bgp_attr_extra_get() while reviewing the code to leave only the "interesting" ones. Maybe a comment would suffice? If not i have no problem in dropping this one. > On Mon, 7 May 2012, Jorge Boncompte [DTI2] wrote: > >> From: "Jorge Boncompte [DTI2]" <jorge [at] dti2> >> >> Signed-off-by: Jorge Boncompte [DTI2] <jorge [at] dti2> >> --- >> bgpd/bgp_route.c | 5 ++--- >> 1 files changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c >> index ad942e2..ad562aa 100644 >> --- a/bgpd/bgp_route.c >> +++ b/bgpd/bgp_route.c >> @@ -5342,9 +5342,8 @@ bgp_redistribute_add (struct prefix *p, const struct >> in_addr *nexthop, >> #ifdef HAVE_IPV6 >> if (nexthop6) >> { >> - struct attr_extra *extra = bgp_attr_extra_get(&attr); >> - extra->mp_nexthop_global = *nexthop6; >> - extra->mp_nexthop_len = 16; >> + attr.extra->mp_nexthop_global = *nexthop6; >> + attr.extra->mp_nexthop_len = 16; >> } >> #endif >> >> > _______________________________________________ Quagga-dev mailing list Quagga-dev [at] lists http://lists.quagga.net/mailman/listinfo/quagga-dev
|