]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: radv: mask unnecessary part of specified addresses
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 27 Sep 2021 13:00:00 +0000 (22:00 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 11 Oct 2021 18:10:30 +0000 (03:10 +0900)
src/network/networkd-radv.c

index 5475ed787ec7f9a12b2ca06f852875c5aa72f6af..1cd605a722f0014b35fa4a6d8715577ef7ac9d7c 100644 (file)
@@ -731,6 +731,8 @@ int config_parse_prefix(
                            "Prefix is invalid, ignoring assignment: %s", rvalue);
                 return 0;
         }
+
+        (void) in6_addr_mask(&a.in6, p->prefixlen);
         p->prefix = a.in6;
 
         TAKE_PTR(p);
@@ -940,6 +942,8 @@ int config_parse_route_prefix(
                            "Route prefix is invalid, ignoring assignment: %s", rvalue);
                 return 0;
         }
+
+        (void) in6_addr_mask(&a.in6, p->prefixlen);
         p->prefix = a.in6;
 
         TAKE_PTR(p);