From a6298493f7627c8a1c45bd90cc6fb5108c3d1a4b Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Wed, 20 Dec 2017 12:31:07 +0100 Subject: [PATCH] gluon-radv-filterd: Fix size argument of recvfrom The 6th argument to recvfrom is not an unsigned int pointer. This may work on systems where socklen_t and unsigned int are both 4 byte but other systems may use 8 byte for that (glibc uses size_t as type for socklen_t and size_t is 8 byte on amd64 and similar architectures). Signed-off-by: Sven Eckelmann --- package/gluon-radv-filterd/src/gluon-radv-filterd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/gluon-radv-filterd/src/gluon-radv-filterd.c b/package/gluon-radv-filterd/src/gluon-radv-filterd.c index 8d515677..d1f8dc76 100644 --- a/package/gluon-radv-filterd/src/gluon-radv-filterd.c +++ b/package/gluon-radv-filterd/src/gluon-radv-filterd.c @@ -318,7 +318,7 @@ static void router_update(const struct ether_addr *mac, uint16_t timeout) { static void handle_ra(int sock) { struct sockaddr_ll src; struct ether_addr mac; - unsigned int addr_size = sizeof(src); + socklen_t addr_size = sizeof(src); ssize_t len; struct { struct ip6_hdr ip6;