dhcp-network: adjust sockaddr length for addresses longer than 8 bytes (#6527)
authorbengal <bengal@users.noreply.github.com>
Tue, 8 Aug 2017 16:55:31 +0000 (18:55 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 8 Aug 2017 16:55:31 +0000 (18:55 +0200)
commitb1f24b75af135fe8efba9c7264447985e2843511
tree6d9f0f2ba4c0b05c1f2ce1d6c913d94080ce0181
parented88a9007a9e45e31d9100c965ab3f94370ec801
dhcp-network: adjust sockaddr length for addresses longer than 8 bytes (#6527)

An infiniband hardware address is 20 bytes, but sockaddr_ll.sll_addr is only 8
bytes. Explicitly ensure that sockaddr_union has enough space for infiniband
addresses, even if they run over sockaddr_ll and add a macro to compute the
proper size to pass to kernel.
src/basic/socket-util.h
src/libsystemd-network/dhcp-network.c