BFD requires defined local IP, but for nexthop with onlink there might
not be such address. So we reject this combination of nexthop options.
This prevent crash where such combination of options is used.
}
| stat_nexthop ONLINK bool {
this_snh->onlink = $3;
+ if (this_snh->use_bfd && this_snh->onlink)
+ cf_error("Options 'bfd' and 'onlink' cannot be combined");
}
| stat_nexthop WEIGHT expr {
this_snh->weight = $3 - 1;
}
| stat_nexthop BFD bool {
this_snh->use_bfd = $3; cf_check_bfd($3);
+ if (this_snh->use_bfd && this_snh->onlink)
+ cf_error("Options 'bfd' and 'onlink' cannot be combined");
}
;