]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/network/networkd-link.c
networkd,udev: clean up MTU handling
authorLennart Poettering <lennart@poettering.net>
Fri, 20 Apr 2018 14:33:00 +0000 (16:33 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 26 Apr 2018 11:51:44 +0000 (13:51 +0200)
commit4e964aa05c4c3e305de6e9ebcb7c9a49f557effc
tree1757700d474bab8e84498bf6bc19bc72b5ec28be
parent79138a384f0c6a0d47cf97cf5a917f32ec4a9ba9
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.)
16 files changed:
src/libsystemd/sd-netlink/netlink-util.c
src/libsystemd/sd-netlink/netlink-util.h
src/libsystemd/sd-netlink/test-netlink.c
src/network/netdev/geneve.c
src/network/netdev/netdev-gperf.gperf
src/network/netdev/netdev.h
src/network/netdev/tuntap.c
src/network/networkctl.c
src/network/networkd-link.c
src/network/networkd-link.h
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-network.h
src/udev/net/link-config-gperf.gperf
src/udev/net/link-config.c
src/udev/net/link-config.h