network: allow to configure interface MTU for CAN devices

Previously, even if MTUBytes= is specified in matching .network file,
the setting was ignored for CAN devices.
This commit is contained in:
Yu Watanabe
2023-12-07 18:57:13 +09:00
parent 15be804282
commit 941f8e1399

View File

@@ -1049,6 +1049,10 @@ static int link_configure(Link *link) {
if (r < 0)
return r;
r = link_configure_mtu(link);
if (r < 0)
return r;
if (link->iftype == ARPHRD_CAN) {
/* let's shortcut things for CAN which doesn't need most of what's done below. */
r = link_request_to_set_can(link);
@@ -1082,10 +1086,6 @@ static int link_configure(Link *link) {
if (r < 0)
return r;
r = link_configure_mtu(link);
if (r < 0)
return r;
r = link_request_to_set_addrgen_mode(link);
if (r < 0)
return r;