From 2e8de416fe609b04f2af3995890d9be8276c5e7b Mon Sep 17 00:00:00 2001 From: Geiger Date: Sun, 5 Mar 2017 14:26:15 +0200 Subject: added veth support --- network-scripts/ifup-eth | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'network-scripts/ifup-eth') diff --git a/network-scripts/ifup-eth b/network-scripts/ifup-eth index a4c0d2b4..04861e56 100755 --- a/network-scripts/ifup-eth +++ b/network-scripts/ifup-eth @@ -45,6 +45,17 @@ if [ -n "${HWADDR}" ]; then fi fi +# Create veth device +if [ "${TYPE}" = "Veth" ]; then + if [ -z "${PEER}" ]; then + net_log $"cannot create veth without peer" + exit 1 + fi + if [ ! -d /sys/class/net/${DEVICE} ]; then + ip link add ${DEVICE} type veth peer name ${PEER} type veth + fi +fi + # If the device is a bridge, create it if [ "${TYPE}" = "Bridge" ]; then bridge_opts="" -- cgit v1.2.1