]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: fix condition for checking the provided gateway is assigned to link
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 24 Dec 2020 04:07:30 +0000 (13:07 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 24 Dec 2020 08:15:44 +0000 (17:15 +0900)
Fix bug introduced by 221019166f315252304b3459902ead613b905de5.

src/network/networkd-ndisc.c

index 2027b73a561ae5294dacb196b5b8dba8ce8b6ef2..7088cfa123b43e59efc51fda52fda81215dab911 100644 (file)
@@ -849,7 +849,7 @@ static int ndisc_router_process_route(Link *link, sd_ndisc_router *rt) {
                 return 0;
         }
 
-        if (link_has_ipv6_address(link, &gateway.in6) == 0) {
+        if (link_has_ipv6_address(link, &gateway.in6) > 0) {
                 if (DEBUG_LOGGING) {
                         _cleanup_free_ char *buf = NULL;