]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #29224 from keszybz/netdev-config-parsing
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 22 Sep 2023 12:29:47 +0000 (14:29 +0200)
committerGitHub <noreply@github.com>
Fri, 22 Sep 2023 12:29:47 +0000 (14:29 +0200)
Use a helper to simplify parsing of ranges in netdev config and related changes

1  2 
src/libsystemd-network/sd-radv.c

index e77d4b4f596ef64f3a5c45d953dccc3b04d31200,9506759bb57512fcdfeb2bb8eb86fddda910a501..7da22c90c20079fd0e86ef4e4275d46496caeafc
@@@ -1141,9 -1144,10 +1141,10 @@@ int sd_radv_pref64_prefix_set_prefix
  
          r = pref64_prefix_length_to_plc(prefixlen, &prefixlen_code);
          if (r < 0)
-                 return log_radv_errno(NULL, r,  "Unsupported PREF64 prefix length %u. Valid lengths are 32, 40, 48, 56, 64 and 96", prefixlen);
+                 return log_radv_errno(NULL, r,
+                                       "Unsupported PREF64 prefix length %u. Valid lengths are 32, 40, 48, 56, 64 and 96", prefixlen);
  
 -        if (lifetime_usec == USEC_INFINITY || DIV_ROUND_UP(lifetime_usec, 8 * USEC_PER_SEC) >= UINT64_C(1) << 13)
 +        if (lifetime_usec > PREF64_MAX_LIFETIME_USEC)
                  return -EINVAL;
  
          /* RFC 8781 - 4.1 rounding up lifetime to multiply of 8 */