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 <sven@narfation.org>
This commit is contained in:
Sven Eckelmann 2017-12-20 12:31:07 +01:00 committed by Jan-Philipp Litza
parent 1633c7c005
commit a6298493f7
No known key found for this signature in database
GPG Key ID: 1FB658053CE27196

View File

@ -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;