[OpenWrt-Devel] netifd: per-interface MTU settings vs per-route MTU settings?

Michael Jones mike at meshplusplus.com
Thu Jun 4 15:25:32 EDT 2020


On Mon, Jun 1, 2020 at 9:39 PM Reuben Dowle <reuben.dowle at 4rf.com> wrote:

> When changing an interface MTU direct through ip command, netifd will get
> be out of sync. The netifd internally tracked MTU (discoverable through
> ubus call network.device status '{"name":"xxx"}' call will always show 1500
> (or whatever the value was when netifd discovered/created the interface).
>
>
>
> I am not aware of any actual issues caused by this, but it is worth
> considering.
>
>
>
> Finding some method to update through ubus is preferable in my opinion.
>
>
>
> For the project I have been working on, we added a ubus network.device
> set_attr method to netifd to solve this problem – see attached patch. Then
> you can use this in the protocol handler:
>
>
>
>         [ -n "$mtu" ] && {
>                 echo "Setting MTU to $mtu"
>                 /sbin/ubus call network.device set_attr
> "{\"device\":\"$ifname\", \"mtu\":\"$mtu\"}"
>         }
>

For what it's worth, I would very much like to see a patch like this merged
into netifd. Modifying the MTU after the fact makes me uncomfortable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200604/37d88ad3/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list