From: Yu Watanabe Date: Thu, 14 Dec 2023 23:22:41 +0000 (+0900) Subject: network/nexthop: fix wrong verification X-Git-Tag: v256-rc1~1419^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4464c3205c811a46942d0968d5687496a22f9689;p=thirdparty%2Fsystemd.git network/nexthop: fix wrong verification This checks the nexthop is not a blackhole, gateway is unrelated. --- diff --git a/src/network/networkd-nexthop.c b/src/network/networkd-nexthop.c index 225ef40fa55..5a1d90eadb9 100644 --- a/src/network/networkd-nexthop.c +++ b/src/network/networkd-nexthop.c @@ -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.",