The BGP local label value is not re-set when the prefix
is either a network or an aggregate prefix. Ensure to
get the appropriate label value each time the 'need_imp_null_label()'
function has to return true.
Fixes: 7ee70320d370 ("bgpd: add cli command to control explicit-null label usage")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
if (new_select->sub_type == BGP_ROUTE_STATIC
|| new_select->sub_type == BGP_ROUTE_AGGREGATE
|| new_select->sub_type == BGP_ROUTE_REDISTRIBUTE)
- return true;
+ goto need_null_label;
else if (new_select->extra &&
bgp_is_valid_label(&new_select->extra->label[0]))
return false;
+need_null_label:
if (label == NULL)
return true;
if (!!CHECK_FLAG(bgp->flags, BGP_FLAG_LU_EXPLICIT_NULL))