ndp: fix signed/unsigned compariosn in the netlink code.

This commit is contained in:
Alexander V. Chernikov 2023-04-25 14:55:56 +00:00
parent 722b2e2f9a
commit 7825619a9e

View file

@ -255,7 +255,7 @@ print_entry(struct snl_parsed_neigh *neigh, struct snl_parsed_link_simple *link)
xo_emit(xobuf, host_buf, ether_str(&sdl), ifname);
/* Print neighbor discovery specific information */
uint32_t expire = neigh->ndaf_next_ts;
time_t expire = (time_t)neigh->ndaf_next_ts;
int expire_in = expire - now.tv_sec;
if (expire > now.tv_sec)
xo_emit("{d:/ %-9.9s}{e:expires_sec/%d}", sec2str(expire_in), expire_in);