summaryrefslogtreecommitdiff
path: root/src/network/netdev/geneve.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-04-20 16:33:00 +0200
committerLennart Poettering <lennart@poettering.net>2018-04-26 13:51:44 +0200
commit4e964aa05c4c3e305de6e9ebcb7c9a49f557effc (patch)
tree1757700d474bab8e84498bf6bc19bc72b5ec28be /src/network/netdev/geneve.c
parent79138a384f0c6a0d47cf97cf5a917f32ec4a9ba9 (diff)
downloadsystemd-4e964aa05c4c3e305de6e9ebcb7c9a49f557effc.tar.gz
networkd,udev: clean up MTU handling
This cleans up handling of MTU values across the codebase. Previously MTU values where stored sometimes in uint32_t, sometimes in uint16_t, sometimes unsigned and sometimes in size_t. This now unifies this to uint32_t across the codebase, as that's what netlink spits out, and what the majority was already using. Also, all MTU parameters are now parsed with config_parse_mtu() and config_parse_ipv6_mtu() is dropped as it is now unneeded. (Note there is one exception for the MTU typing: in the DCHPv4 code we continue to process the MTU as uint16_t value, as it is encoded like that in the protocol, and it's probably better stay close to the protocol there.)
Diffstat (limited to 'src/network/netdev/geneve.c')
-rw-r--r--src/network/netdev/geneve.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/netdev/geneve.c b/src/network/netdev/geneve.c
index 175acb4cfb..4e865553ec 100644
--- a/src/network/netdev/geneve.c
+++ b/src/network/netdev/geneve.c
@@ -66,7 +66,7 @@ static int netdev_geneve_create(NetDev *netdev) {
return log_netdev_error_errno(netdev, r, "Could not append IFLA_ADDRESS attribute: %m");
}
- if (netdev->mtu) {
+ if (netdev->mtu != 0) {
r = sd_netlink_message_append_u32(m, IFLA_MTU, netdev->mtu);
if (r < 0)
return log_netdev_error_errno(netdev, r, "Could not append IFLA_MTU attribute: %m");