summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/lldp-network.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-network/lldp-network.c')
-rw-r--r--src/libsystemd-network/lldp-network.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd-network/lldp-network.c b/src/libsystemd-network/lldp-network.c
index f031760351..59c25598e9 100644
--- a/src/libsystemd-network/lldp-network.c
+++ b/src/libsystemd-network/lldp-network.c
@@ -57,7 +57,8 @@ int lldp_network_bind_raw_socket(int ifindex) {
assert(ifindex > 0);
- fd = socket(PF_PACKET, SOCK_RAW|SOCK_CLOEXEC|SOCK_NONBLOCK, htons(ETHERTYPE_LLDP));
+ fd = socket(PF_PACKET, SOCK_RAW|SOCK_CLOEXEC|SOCK_NONBLOCK,
+ htobe16(ETHERTYPE_LLDP));
if (fd < 0)
return -errno;