1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-14 19:41:51 +00:00

Fix MTU setting for macvlan

This commit is contained in:
Ycarus 2018-08-13 22:45:44 +02:00
parent 2353064758
commit 9e84fb41d5

View file

@ -32,6 +32,8 @@ _setup_interface() {
config_get _type "$1" type
uci -q get "network.$1_dev.ifname" >/dev/null && {
uci -q set network.$1_dev.mtu=$(uci -q get network.$1.mtu)
uci -q commit network
[ "$_type" = "macvlan" ] || {
uci -q batch <<-EOF
delete network.$1_dev
@ -66,6 +68,7 @@ _setup_interface() {
_macaddr=$(uci -q get "network.$1.macaddr")
_setup_macaddr "$1" "${_macaddr:-auto$(date +%s)}"
uci -q set "network.$1.type=macvlan" # legacy
uci -q set network.$1_dev.mtu=$(uci -q get network.$1.mtu)
uci -q commit network
}