Skip to content

Commit

Permalink
Only send non-zero route lifetime to NETLINK
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinMcInnes authored Jan 9, 2025
1 parent d2306bd commit 4a07e73
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/if-linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4a07e73

Please sign in to comment.