+ if (idx < 0) {
+ usernic_error("Could not find netdev %s\n", name);
+ return NETDEV_MTU_DEFAULT;
+ }
+
+ val = netdev_get_mtu(idx);
+ if (val < 0) {
+ usernic_error("Could not get MTU for netdev %s ifindex %d\n", name, idx);
+ return NETDEV_MTU_DEFAULT;
+ }