]>
Commit | Line | Data |
---|---|---|
6f132b4c DM |
1 | Index: new/bin/vznetaddbr.in |
2 | =================================================================== | |
3 | --- new.orig/bin/vznetaddbr.in 2013-10-04 09:09:45.000000000 +0200 | |
4 | +++ new/bin/vznetaddbr.in 2013-10-04 09:21:04.000000000 +0200 | |
5 | @@ -29,8 +29,14 @@ | |
6 | [ -n "$bridge" ] || | |
7 | bridge=vmbr0 | |
8 | ||
9 | + if [ ! -f "/sys/class/net/$bridge/mtu" ]; then | |
10 | + echo >&2 "bridge $bridge does not exists." | |
11 | + exit 1 | |
12 | + fi | |
13 | + | |
14 | echo "Adding interface $host_ifname to bridge $bridge on CT0 for CT$VEID" | |
15 | - ip link set dev "$host_ifname" up | |
16 | + bridge_mtu=$(cat "/sys/class/net/$bridge/mtu") | |
17 | + ip link set dev "$host_ifname" up mtu "$bridge_mtu" | |
18 | ip addr add 0.0.0.0/0 dev "$host_ifname" | |
19 | echo 1 >"/proc/sys/net/ipv4/conf/$host_ifname/proxy_arp" | |
20 | echo 1 >"/proc/sys/net/ipv4/conf/$host_ifname/forwarding" |