diff options
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r-- | src/libsystemd-network/test-lldp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-network/test-lldp.c b/src/libsystemd-network/test-lldp.c index 946f358e32..f81284e2a7 100644 --- a/src/libsystemd-network/test-lldp.c +++ b/src/libsystemd-network/test-lldp.c @@ -45,13 +45,13 @@ static struct ether_addr mac_addr = { static int lldp_build_tlv_packet(tlv_packet **ret) { _cleanup_tlv_packet_free_ tlv_packet *m = NULL; const uint8_t lldp_dst[] = LLDP_MULTICAST_ADDR; - struct ether_header ether; + struct ether_header ether = { + .ether_type = htons(ETHERTYPE_LLDP), + }; /* Append ethernet header */ - memset(ðer, 0, sizeof(ether)); memcpy(ðer.ether_dhost, lldp_dst, ETHER_ADDR_LEN); memcpy(ðer.ether_shost, &mac_addr, ETHER_ADDR_LEN); - ether.ether_type = htons(ETHERTYPE_LLDP); assert_se(tlv_packet_new(&m) >= 0); |