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:
parent
2353064758
commit
9e84fb41d5
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue