Skip to content

Commit 5af54e4

Browse files
author
Christopher White
committed
o Fix crash caused by signedness error
in warning removal.
1 parent 7403041 commit 5af54e4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tuntap/lispd_tuntap/lispd_if.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,8 @@ void handle_route_change(struct rtmsg *rtm, unsigned int msg_len)
751751
void process_interface_notification(void)
752752
{
753753
char buffer[IF_MSG_SIZE];
754-
uint32_t len, payload_len;
754+
int len;
755+
uint32_t payload_len;
755756
struct nlmsghdr *nlh;
756757
struct ifaddrmsg *ifa;
757758
struct ifinfomsg *ifi;
@@ -760,7 +761,7 @@ void process_interface_notification(void)
760761
nlh = (struct nlmsghdr *)buffer;
761762
while ((len = recv(rtnetlink_fd, nlh, IF_MSG_SIZE, 0)) > 0)
762763
{
763-
for (; (NLMSG_OK(nlh, len)) && (nlh->nlmsg_type != NLMSG_DONE); nlh = NLMSG_NEXT(nlh, len))
764+
for (; (NLMSG_OK(nlh, (uint32_t)len)) && (nlh->nlmsg_type != NLMSG_DONE); nlh = NLMSG_NEXT(nlh, len))
764765
{
765766
switch (nlh->nlmsg_type) {
766767
case RTM_NEWADDR:

0 commit comments

Comments
 (0)