From 4a07e739a37160d4f33d97b29b936b2f8c8e611a Mon Sep 17 00:00:00 2001 From: Colin McInnes Date: Thu, 9 Jan 2025 11:59:29 -0600 Subject: [PATCH] Only send non-zero route lifetime to NETLINK --- src/if-linux.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/if-linux.c b/src/if-linux.c index e8d2c85b..4dad05da 100644 --- a/src/if-linux.c +++ b/src/if-linux.c @@ -753,9 +753,14 @@ if_copyrt(struct dhcpcd_ctx *ctx, struct rt *rt, struct nlmsghdr *nlm) break; } case RTA_EXPIRES: - rt->rt_expires = *(uint32_t *)RTA_DATA(rta); + { + if (rt->rt_expires != 0) + { + rt->rt_expires = *(uint32_t *)RTA_DATA(rta); + } break; } + } if (sa != NULL) { socklen_t salen;