summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-nexthop.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-12-15 00:22:41 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-12-20 20:22:46 +0100
commit4464c3205c811a46942d0968d5687496a22f9689 (patch)
treeb40c885144790795f75ed70a17bea6feaa7e9141 /src/network/networkd-nexthop.c
parentnetwork/nexthop: add several assertions related to nexthop ID (diff)
downloadsystemd-4464c3205c811a46942d0968d5687496a22f9689.tar.xz
systemd-4464c3205c811a46942d0968d5687496a22f9689.zip
network/nexthop: fix wrong verification
This checks the nexthop is not a blackhole, gateway is unrelated.
Diffstat (limited to 'src/network/networkd-nexthop.c')
-rw-r--r--src/network/networkd-nexthop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/networkd-nexthop.c b/src/network/networkd-nexthop.c
index 225ef40fa5..5a1d90eadb 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.",