Commit d60c8d69 authored by Lionel Gauthier's avatar Lionel Gauthier

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5410 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 2cd42147
......@@ -163,23 +163,13 @@ is_openvswitch_interface() {
if [ "a$var" == "a" ]; then
return 0
fi
if [ "a${var:0:3}" == "aeth" ]; then
return 0;
else
if [ "a${var:0:4}" == "awlan" ]; then
return 0;
else
if [ "a${var:0:4}" == "awifi" ]; then
return 0;
else
if [ "a${var:0:4}" == "anone" ]; then
return 0;
else
if [ "a${var:0:3}" == "atun" ]; then
return 0;
else
if [ "a${var:0:4}" == "avbox" ]; then
return 0;
if [ "a${var:0:3}" != "aeth" ]; then
if [ "a${var:0:4}" != "awlan" ]; then
if [ "a${var:0:4}" != "awifi" ]; then
if [ "a${var:0:4}" != "anone" ]; then
if [ "a${var:0:3}" != "atun" ]; then
if [ "a${var:0:4}" != "avbox" ]; then
return 1;
fi
fi
fi
......@@ -187,7 +177,7 @@ is_openvswitch_interface() {
fi
fi
done
return 1;
return 0;
}
delete_tun_interface() {
......@@ -200,9 +190,17 @@ delete_tun_interface() {
delete_vlan_interface() {
is_vlan_interface $1
if [ $? -eq 0 ]; then
ifconfig $1 down > /dev/null 2>&1
vconfig rem $1 > /dev/null 2>&1
if [ $? -eq 1 ]; then
bash_exec "ifconfig $1 down "
bash_exec "vconfig rem $1 "
fi
}
delete_openvswitch_interface() {
is_openvswitch_interface $1
if [ $? -eq 1 ]; then
bash_exec "ifconfig $1 down "
bash_exec "tunctl -d $1 "
fi
}
......@@ -210,20 +208,21 @@ delete_vlan_interface() {
create_tun_interface() {
is_tun_interface $1
if [ $? -eq 1 ]; then
openvpn --mktun --dev $1
bash_exec "openvpn --mktun --dev $1"
fi
#ip link set $1 up
}
delete_openvswitch_interface() {
is_openvswitch_interface $1
create_vlan_interface() {
is_vlan_interface $1
if [ $? -eq 1 ]; then
ifconfig $1 down > /dev/null 2>&1
tunctl -d $1 > /dev/null 2>&1
interface_name=`echo $1 | cut -f1 -d '.'`
vlan=`echo $1 | cut -f2 -d '.'`
bash_exec "vconfig add $interface_name $vlan"
fi
}
create_openvswitch_interface() {
is_openvswitch_interface $1
if [ $? -eq 1 ]; then
......
......@@ -133,11 +133,11 @@
# | | 11 VLANS | |
# +-----------+ ids=[5..15] +--------------+
BRIDGE="vswitch"
###########################################################
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
source $THIS_SCRIPT_PATH/utils.bash
. $THIS_SCRIPT_PATH/utils.bash
. $THIS_SCRIPT_PATH/interfaces.bash
. $THIS_SCRIPT_PATH/networks.bash
###########################################################
if [ $# -eq 1 ]; then
......@@ -285,8 +285,6 @@ if [ $? -eq 1 ]; then
clean_epc_vlan_network
build_mme_spgw_vlan_network
else
ovs_setting=0
vlan_setting=0
clean_epc_vlan_network
create_sgi_vlans
fi
......
......@@ -674,10 +674,7 @@ compile_epc() {
exit 1
fi
}
###########################################################
THIS_UTILS_SCRIPT_PATH=$(dirname $(readlink -f $0))
source $THIS_UTILS_SCRIPT_PATH/networks.bash
###########################################################
###########################################################
IPTABLES=/sbin/iptables
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment