network/nexthop: fix wrong verification

This checks the nexthop is not a blackhole, gateway is unrelated.
This commit is contained in:
Yu Watanabe 2023-12-15 08:22:41 +09:00
parent c1e0890004
commit 4464c3205c

View file

@ -1018,7 +1018,7 @@ static int nexthop_section_verify(NextHop *nh) {
"Ignoring [NextHop] section from line %u.",
nh->section->filename, nh->section->line);
if (nh->blackhole && in_addr_is_set(nh->family, &nh->gw))
if (nh->blackhole)
return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
"%s: nexthop group cannot be a blackhole. "
"Ignoring [NextHop] section from line %u.",