]> git.ipfire.org Git - thirdparty/lldpd.git/commit
interfaces: ensure we don't break strict aliasing rule
authorVincent Bernat <vincent@bernat.im>
Sat, 14 May 2016 17:46:07 +0000 (19:46 +0200)
committerVincent Bernat <vincent@bernat.im>
Sat, 14 May 2016 17:46:07 +0000 (19:46 +0200)
commitb562f01fe4fdd24e6819f383e65017b680a159f5
treeb8aa3d12f7b3dcdec1024af4b17af4c96088b158
parent2d3ca7ee10093f873093f50940a4b95162236f6d
interfaces: ensure we don't break strict aliasing rule

Use an union to manipulate IPv4/IPv6 address. Other occurrences are
using memcpy (notably with "struct sockaddr_storage"). This is
preventive since gcc seems to rely more on this strict aliasing rule
since gcc-6.
src/daemon/interfaces.c
src/lldpd-structs.h