]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network/nexthop: fix wrong verification
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 14 Dec 2023 23:22:41 +0000 (08:22 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 20 Dec 2023 19:22:46 +0000 (04:22 +0900)
This checks the nexthop is not a blackhole, gateway is unrelated.

src/network/networkd-nexthop.c

index 225ef40fa5578e1b3aac8a04c5e4d7ce3533511b..5a1d90eadb9101f33ba34ceed94368e6c0a3af13 100644 (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.",