<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 1, 2020 at 9:39 PM Reuben Dowle <<a href="mailto:reuben.dowle@4rf.com">reuben.dowle@4rf.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-NZ">
<div class="gmail-m_5725637833753931530WordSection1">
<p class="MsoNormal"><span>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).<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>I am not aware of any actual issues caused by this, but it is worth considering.<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Finding some method to update through ubus is preferable in my opinion.<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>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:<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal">        [ -n "$mtu" ] && {<br>
                echo "Setting MTU to $mtu"<br>
                /sbin/ubus call network.device set_attr "{\"device\":\"$ifname\", \"mtu\":\"$mtu\"}"<br>
        }</p></div></div></blockquote><div><br></div><div>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.</div></div></div>