pbrd: nexthop_group delete cb don't free pbr->nhg

The pbr->nhg callback is used exclusively for individual nexthops
set through `set nexthop`. If an actuall "tracked" nexthop_group is
used, only the `pbrms->nhgrp_name` is set. Thus this delete does
nothing.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
Stephen Worley 2019-10-04 13:54:39 -04:00
parent b2665a211e
commit cd36b87d8c

View File

@ -639,7 +639,6 @@ void pbr_nht_delete_group(const char *name)
if (pbrms->nhgrp_name if (pbrms->nhgrp_name
&& strmatch(pbrms->nhgrp_name, name)) { && strmatch(pbrms->nhgrp_name, name)) {
pbrms->reason |= PBR_MAP_INVALID_NO_NEXTHOPS; pbrms->reason |= PBR_MAP_INVALID_NO_NEXTHOPS;
nexthop_group_delete(&pbrms->nhg);
pbrms->nhg = NULL; pbrms->nhg = NULL;
pbrms->internal_nhg_name = NULL; pbrms->internal_nhg_name = NULL;
pbrm->valid = false; pbrm->valid = false;