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.)
This commit is contained in:
@@ -821,7 +821,7 @@ static int link_status_one(
|
||||
}
|
||||
|
||||
if (info->has_mtu)
|
||||
printf(" MTU: %u\n", info->mtu);
|
||||
printf(" MTU: %" PRIu32 "\n", info->mtu);
|
||||
|
||||
(void) dump_addresses(rtnl, " Address: ", info->ifindex);
|
||||
(void) dump_gateways(rtnl, hwdb, " Gateway: ", info->ifindex);
|
||||
|
||||
Reference in New Issue
Block a user