summaryrefslogtreecommitdiffstats
path: root/src/libsystemd-network/sd-radv.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-09-06 20:13:39 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-09-19 22:04:03 +0200
commitca515c961b4bcc3e3f703fa6ccd308d755fc7edf (patch)
tree6211ce714af33d5b2dac35a61cb8d4264e1f54e1 /src/libsystemd-network/sd-radv.c
parentmkfs-util: Only unshare mount namespace if needed (diff)
downloadsystemd-ca515c961b4bcc3e3f703fa6ccd308d755fc7edf.tar.xz
systemd-ca515c961b4bcc3e3f703fa6ccd308d755fc7edf.zip
libsystemd-network: introduce several helper functions to handle time values
These will be used in later commits.
Diffstat (limited to 'src/libsystemd-network/sd-radv.c')
-rw-r--r--src/libsystemd-network/sd-radv.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/libsystemd-network/sd-radv.c b/src/libsystemd-network/sd-radv.c
index a35311efb9..1226781637 100644
--- a/src/libsystemd-network/sd-radv.c
+++ b/src/libsystemd-network/sd-radv.c
@@ -126,18 +126,6 @@ static bool router_lifetime_is_valid(usec_t lifetime_usec) {
lifetime_usec <= RADV_MAX_ROUTER_LIFETIME_USEC);
}
-static be32_t usec_to_be32_sec(usec_t usec) {
- if (usec == USEC_INFINITY)
- /* UINT32_MAX is handled as infinity. */
- return htobe32(UINT32_MAX);
-
- if (usec >= UINT32_MAX * USEC_PER_SEC)
- /* Finite but too large. Let's use the largest finite value. */
- return htobe32(UINT32_MAX - 1);
-
- return htobe32(usec / USEC_PER_SEC);
-}
-
static int radv_send(sd_radv *ra, const struct in6_addr *dst, usec_t lifetime_usec) {
struct sockaddr_in6 dst_addr = {
.sin6_family = AF_INET6,