2014-07-30 13:22:24 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
[ -n "$INCLUDE_ONLY" ] || {
|
|
|
|
. /lib/functions.sh
|
|
|
|
. /lib/functions/network.sh
|
|
|
|
. ../netifd-proto.sh
|
|
|
|
init_proto "$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
gre_generic_setup() {
|
|
|
|
local cfg="$1"
|
|
|
|
local mode="$2"
|
|
|
|
local local="$3"
|
|
|
|
local remote="$4"
|
|
|
|
local link="$5"
|
2016-02-01 12:02:11 +00:00
|
|
|
local mtu ttl tos zone ikey okey icsum ocsum iseqno oseqno multicast
|
|
|
|
json_get_vars mtu ttl tos zone ikey okey icsum ocsum iseqno oseqno multicast
|
2014-07-30 13:22:24 +00:00
|
|
|
|
|
|
|
[ -z "$zone" ] && zone="wan"
|
2016-02-01 12:02:11 +00:00
|
|
|
[ -z "$multicast" ] && multicast=1
|
2014-07-30 13:22:24 +00:00
|
|
|
|
|
|
|
proto_init_update "$link" 1
|
|
|
|
|
|
|
|
proto_add_tunnel
|
|
|
|
json_add_string mode "$mode"
|
|
|
|
json_add_int mtu "${mtu:-1280}"
|
|
|
|
[ -n "$df" ] && json_add_boolean df "$df"
|
2017-09-11 13:27:53 +00:00
|
|
|
[ -n "$ttl" ] && json_add_int ttl "$ttl"
|
2014-09-29 18:00:02 +00:00
|
|
|
[ -n "$tos" ] && json_add_string tos "$tos"
|
2016-02-01 12:02:11 +00:00
|
|
|
json_add_boolean multicast "$multicast"
|
2014-07-30 13:22:24 +00:00
|
|
|
json_add_string local "$local"
|
|
|
|
json_add_string remote "$remote"
|
|
|
|
[ -n "$tunlink" ] && json_add_string link "$tunlink"
|
|
|
|
json_add_string info "${ikey:-0},${okey:-0},${icsum:-0},${ocsum:-0},${iseqno:-0},${oseqno:-0}"
|
|
|
|
proto_close_tunnel
|
|
|
|
|
|
|
|
proto_add_data
|
|
|
|
[ -n "$zone" ] && json_add_string zone "$zone"
|
|
|
|
proto_close_data
|
|
|
|
|
|
|
|
proto_send_update "$cfg"
|
|
|
|
}
|
|
|
|
|
|
|
|
gre_setup() {
|
|
|
|
local cfg="$1"
|
|
|
|
local mode="$2"
|
2016-10-03 08:56:45 +00:00
|
|
|
local remoteip
|
2014-07-30 13:22:24 +00:00
|
|
|
|
|
|
|
local ipaddr peeraddr
|
|
|
|
json_get_vars df ipaddr peeraddr tunlink
|
|
|
|
|
|
|
|
[ -z "$peeraddr" ] && {
|
2016-10-03 08:56:45 +00:00
|
|
|
proto_notify_error "$cfg" "MISSING_PEER_ADDRESS"
|
2014-07-30 13:22:24 +00:00
|
|
|
proto_block_restart "$cfg"
|
|
|
|
exit
|
|
|
|
}
|
|
|
|
|
2016-10-03 08:56:45 +00:00
|
|
|
remoteip=$(resolveip -t 10 -4 "$peeraddr")
|
|
|
|
|
|
|
|
if [ -z "$remoteip" ]; then
|
|
|
|
proto_notify_error "$cfg" "PEER_RESOLVE_FAIL"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
for ip in $remoteip; do
|
|
|
|
peeraddr=$ip
|
|
|
|
break
|
|
|
|
done
|
|
|
|
|
2014-08-05 09:57:55 +00:00
|
|
|
( proto_add_host_dependency "$cfg" "$peeraddr" "$tunlink" )
|
2014-07-30 13:22:24 +00:00
|
|
|
|
|
|
|
[ -z "$ipaddr" ] && {
|
|
|
|
local wanif="$tunlink"
|
|
|
|
if [ -z $wanif ] && ! network_find_wan wanif; then
|
|
|
|
proto_notify_error "$cfg" "NO_WAN_LINK"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! network_get_ipaddr ipaddr "$wanif"; then
|
|
|
|
proto_notify_error "$cfg" "NO_WAN_LINK"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
[ -z "$df" ] && df="1"
|
|
|
|
|
gre: add different per-protocol prefixes to GRE-TAP IPv4/6 tunnel interfaces.
This commit modifies the /lib/netifd/proto/gre.sh script so that, when
GRE-TAP tunnels are created, either IPv4 or IPv6, the prefix before the chosen
interface name contains the "tap" substring, to differentiate them from non-TAP
GRE tunnels.
Right now, both GRE and GRE-TAP tunnel (either IPv4 or IPv6) interfaces defined
in /etc/config/network are named equally ("gre-"+$ifname or "grev6"+$ifname)
upon creation. For instance, the following tunnels:
config interface 'tuna'
option peeraddr '172.30.22.1'
option proto 'gre'
config interface 'tunb'
option peeraddr '192.168.233.4'
option proto 'gretap'
config interface 'tunc'
option peer6addr 'fdc5:7c9e:e93d:45af::1'
option proto 'grev6'
config interface 'tund'
option peer6addr 'fdc0:6071:1348:31ff::2'
option proto 'grev6tap'
are named, respectively, "gre-tuna", "gre-tunb", "grev6-tunc" and "grev6-tund".
The current change makes that each GRE tunnel interface of the four different
types available (gre, gretap, grev6 and grev6tap) gets a different prefix.
Therefore, the abovementioned tunnels will be named, respectively:
"gre4-tuna", "gre4t-tunb", "gre6-tunc" and "gre6t-tund".
This is coherent with other types of virtual interfaces (i.e. PPP, PPPoE, PPPoA)
where the whole protocol name is used. For instance, a PPPoA interface named
"p1" and a PPPoE interface named "p2" will respectively appear as "pppoa-p1"
and "pppoe-p2", not as "ppp-p1" and "ppp-p2").
Since Linux interfaces names are limited to 15 characters, these prefixes leave,
for the worst case (TAP tunnels), 9 characters for the actual name.
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2016-11-02 12:18:01 +00:00
|
|
|
case "$mode" in
|
|
|
|
gretapip)
|
|
|
|
gre_generic_setup $cfg $mode $ipaddr $peeraddr "gre4t-$cfg"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
gre_generic_setup $cfg $mode $ipaddr $peeraddr "gre4-$cfg"
|
|
|
|
;;
|
|
|
|
esac
|
2014-07-30 13:22:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
proto_gre_setup() {
|
|
|
|
local cfg="$1"
|
|
|
|
|
|
|
|
gre_setup $cfg "greip"
|
|
|
|
}
|
|
|
|
|
|
|
|
proto_gretap_setup() {
|
|
|
|
local cfg="$1"
|
|
|
|
|
|
|
|
local network
|
|
|
|
json_get_vars network
|
|
|
|
|
|
|
|
gre_setup $cfg "gretapip"
|
|
|
|
|
|
|
|
json_init
|
gre: add different per-protocol prefixes to GRE-TAP IPv4/6 tunnel interfaces.
This commit modifies the /lib/netifd/proto/gre.sh script so that, when
GRE-TAP tunnels are created, either IPv4 or IPv6, the prefix before the chosen
interface name contains the "tap" substring, to differentiate them from non-TAP
GRE tunnels.
Right now, both GRE and GRE-TAP tunnel (either IPv4 or IPv6) interfaces defined
in /etc/config/network are named equally ("gre-"+$ifname or "grev6"+$ifname)
upon creation. For instance, the following tunnels:
config interface 'tuna'
option peeraddr '172.30.22.1'
option proto 'gre'
config interface 'tunb'
option peeraddr '192.168.233.4'
option proto 'gretap'
config interface 'tunc'
option peer6addr 'fdc5:7c9e:e93d:45af::1'
option proto 'grev6'
config interface 'tund'
option peer6addr 'fdc0:6071:1348:31ff::2'
option proto 'grev6tap'
are named, respectively, "gre-tuna", "gre-tunb", "grev6-tunc" and "grev6-tund".
The current change makes that each GRE tunnel interface of the four different
types available (gre, gretap, grev6 and grev6tap) gets a different prefix.
Therefore, the abovementioned tunnels will be named, respectively:
"gre4-tuna", "gre4t-tunb", "gre6-tunc" and "gre6t-tund".
This is coherent with other types of virtual interfaces (i.e. PPP, PPPoE, PPPoA)
where the whole protocol name is used. For instance, a PPPoA interface named
"p1" and a PPPoE interface named "p2" will respectively appear as "pppoa-p1"
and "pppoe-p2", not as "ppp-p1" and "ppp-p2").
Since Linux interfaces names are limited to 15 characters, these prefixes leave,
for the worst case (TAP tunnels), 9 characters for the actual name.
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2016-11-02 12:18:01 +00:00
|
|
|
json_add_string name "gre4t-$cfg"
|
2014-07-30 13:22:24 +00:00
|
|
|
json_add_boolean link-ext 0
|
|
|
|
json_close_object
|
|
|
|
|
|
|
|
for i in $network; do
|
|
|
|
ubus call network.interface."$i" add_device "$(json_dump)"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
grev6_setup() {
|
|
|
|
local cfg="$1"
|
|
|
|
local mode="$2"
|
2016-10-03 08:56:45 +00:00
|
|
|
local remoteip6
|
2014-07-30 13:22:24 +00:00
|
|
|
|
|
|
|
local ip6addr peer6addr weakif
|
|
|
|
json_get_vars ip6addr peer6addr tunlink weakif
|
|
|
|
|
|
|
|
[ -z "$peer6addr" ] && {
|
2016-10-03 08:56:45 +00:00
|
|
|
proto_notify_error "$cfg" "MISSING_PEER_ADDRESS"
|
2014-07-30 13:22:24 +00:00
|
|
|
proto_block_restart "$cfg"
|
|
|
|
exit
|
|
|
|
}
|
|
|
|
|
2016-10-03 08:56:45 +00:00
|
|
|
remoteip6=$(resolveip -t 10 -6 "$peer6addr")
|
|
|
|
|
|
|
|
if [ -z "$remoteip6" ]; then
|
|
|
|
proto_notify_error "$cfg" "PEER_RESOLVE_FAIL"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
for ip6 in $remoteip6; do
|
|
|
|
peer6addr=$ip6
|
|
|
|
break
|
|
|
|
done
|
|
|
|
|
2014-08-05 09:57:55 +00:00
|
|
|
( proto_add_host_dependency "$cfg" "$peer6addr" "$tunlink" )
|
2014-07-30 13:22:24 +00:00
|
|
|
|
|
|
|
[ -z "$ip6addr" ] && {
|
|
|
|
local wanif="$tunlink"
|
|
|
|
if [ -z $wanif ] && ! network_find_wan6 wanif; then
|
|
|
|
proto_notify_error "$cfg" "NO_WAN_LINK"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! network_get_ipaddr6 ip6addr "$wanif"; then
|
|
|
|
[ -z "$weakif" ] && weakif="lan"
|
|
|
|
if ! network_get_ipaddr6 ip6addr "$weakif"; then
|
|
|
|
proto_notify_error "$cfg" "NO_WAN_LINK"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
gre: add different per-protocol prefixes to GRE-TAP IPv4/6 tunnel interfaces.
This commit modifies the /lib/netifd/proto/gre.sh script so that, when
GRE-TAP tunnels are created, either IPv4 or IPv6, the prefix before the chosen
interface name contains the "tap" substring, to differentiate them from non-TAP
GRE tunnels.
Right now, both GRE and GRE-TAP tunnel (either IPv4 or IPv6) interfaces defined
in /etc/config/network are named equally ("gre-"+$ifname or "grev6"+$ifname)
upon creation. For instance, the following tunnels:
config interface 'tuna'
option peeraddr '172.30.22.1'
option proto 'gre'
config interface 'tunb'
option peeraddr '192.168.233.4'
option proto 'gretap'
config interface 'tunc'
option peer6addr 'fdc5:7c9e:e93d:45af::1'
option proto 'grev6'
config interface 'tund'
option peer6addr 'fdc0:6071:1348:31ff::2'
option proto 'grev6tap'
are named, respectively, "gre-tuna", "gre-tunb", "grev6-tunc" and "grev6-tund".
The current change makes that each GRE tunnel interface of the four different
types available (gre, gretap, grev6 and grev6tap) gets a different prefix.
Therefore, the abovementioned tunnels will be named, respectively:
"gre4-tuna", "gre4t-tunb", "gre6-tunc" and "gre6t-tund".
This is coherent with other types of virtual interfaces (i.e. PPP, PPPoE, PPPoA)
where the whole protocol name is used. For instance, a PPPoA interface named
"p1" and a PPPoE interface named "p2" will respectively appear as "pppoa-p1"
and "pppoe-p2", not as "ppp-p1" and "ppp-p2").
Since Linux interfaces names are limited to 15 characters, these prefixes leave,
for the worst case (TAP tunnels), 9 characters for the actual name.
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2016-11-02 12:18:01 +00:00
|
|
|
case "$mode" in
|
|
|
|
gretapip6)
|
|
|
|
gre_generic_setup $cfg $mode $ip6addr $peer6addr "gre6t-$cfg"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
gre_generic_setup $cfg $mode $ip6addr $peer6addr "gre6-$cfg"
|
|
|
|
;;
|
|
|
|
esac
|
2014-07-30 13:22:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
proto_grev6_setup() {
|
|
|
|
local cfg="$1"
|
|
|
|
|
|
|
|
grev6_setup $cfg "greip6"
|
|
|
|
}
|
|
|
|
|
|
|
|
proto_grev6tap_setup() {
|
|
|
|
local cfg="$1"
|
|
|
|
|
|
|
|
local network
|
|
|
|
json_get_vars network
|
|
|
|
|
|
|
|
grev6_setup $cfg "gretapip6"
|
|
|
|
|
|
|
|
json_init
|
gre: add different per-protocol prefixes to GRE-TAP IPv4/6 tunnel interfaces.
This commit modifies the /lib/netifd/proto/gre.sh script so that, when
GRE-TAP tunnels are created, either IPv4 or IPv6, the prefix before the chosen
interface name contains the "tap" substring, to differentiate them from non-TAP
GRE tunnels.
Right now, both GRE and GRE-TAP tunnel (either IPv4 or IPv6) interfaces defined
in /etc/config/network are named equally ("gre-"+$ifname or "grev6"+$ifname)
upon creation. For instance, the following tunnels:
config interface 'tuna'
option peeraddr '172.30.22.1'
option proto 'gre'
config interface 'tunb'
option peeraddr '192.168.233.4'
option proto 'gretap'
config interface 'tunc'
option peer6addr 'fdc5:7c9e:e93d:45af::1'
option proto 'grev6'
config interface 'tund'
option peer6addr 'fdc0:6071:1348:31ff::2'
option proto 'grev6tap'
are named, respectively, "gre-tuna", "gre-tunb", "grev6-tunc" and "grev6-tund".
The current change makes that each GRE tunnel interface of the four different
types available (gre, gretap, grev6 and grev6tap) gets a different prefix.
Therefore, the abovementioned tunnels will be named, respectively:
"gre4-tuna", "gre4t-tunb", "gre6-tunc" and "gre6t-tund".
This is coherent with other types of virtual interfaces (i.e. PPP, PPPoE, PPPoA)
where the whole protocol name is used. For instance, a PPPoA interface named
"p1" and a PPPoE interface named "p2" will respectively appear as "pppoa-p1"
and "pppoe-p2", not as "ppp-p1" and "ppp-p2").
Since Linux interfaces names are limited to 15 characters, these prefixes leave,
for the worst case (TAP tunnels), 9 characters for the actual name.
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2016-11-02 12:18:01 +00:00
|
|
|
json_add_string name "gre6t-$cfg"
|
2014-07-30 13:22:24 +00:00
|
|
|
json_add_boolean link-ext 0
|
|
|
|
json_close_object
|
|
|
|
|
|
|
|
for i in $network; do
|
|
|
|
ubus call network.interface."$i" add_device "$(json_dump)"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
gretap_generic_teardown() {
|
|
|
|
local network
|
|
|
|
json_get_vars network
|
|
|
|
|
|
|
|
json_init
|
|
|
|
json_add_string name "$1"
|
|
|
|
json_add_boolean link-ext 0
|
|
|
|
json_close_object
|
|
|
|
|
|
|
|
for i in $network; do
|
|
|
|
ubus call network.interface."$i" remove_device "$(json_dump)"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
proto_gre_teardown() {
|
|
|
|
local cfg="$1"
|
|
|
|
}
|
|
|
|
|
|
|
|
proto_gretap_teardown() {
|
|
|
|
local cfg="$1"
|
|
|
|
|
gre: add different per-protocol prefixes to GRE-TAP IPv4/6 tunnel interfaces.
This commit modifies the /lib/netifd/proto/gre.sh script so that, when
GRE-TAP tunnels are created, either IPv4 or IPv6, the prefix before the chosen
interface name contains the "tap" substring, to differentiate them from non-TAP
GRE tunnels.
Right now, both GRE and GRE-TAP tunnel (either IPv4 or IPv6) interfaces defined
in /etc/config/network are named equally ("gre-"+$ifname or "grev6"+$ifname)
upon creation. For instance, the following tunnels:
config interface 'tuna'
option peeraddr '172.30.22.1'
option proto 'gre'
config interface 'tunb'
option peeraddr '192.168.233.4'
option proto 'gretap'
config interface 'tunc'
option peer6addr 'fdc5:7c9e:e93d:45af::1'
option proto 'grev6'
config interface 'tund'
option peer6addr 'fdc0:6071:1348:31ff::2'
option proto 'grev6tap'
are named, respectively, "gre-tuna", "gre-tunb", "grev6-tunc" and "grev6-tund".
The current change makes that each GRE tunnel interface of the four different
types available (gre, gretap, grev6 and grev6tap) gets a different prefix.
Therefore, the abovementioned tunnels will be named, respectively:
"gre4-tuna", "gre4t-tunb", "gre6-tunc" and "gre6t-tund".
This is coherent with other types of virtual interfaces (i.e. PPP, PPPoE, PPPoA)
where the whole protocol name is used. For instance, a PPPoA interface named
"p1" and a PPPoE interface named "p2" will respectively appear as "pppoa-p1"
and "pppoe-p2", not as "ppp-p1" and "ppp-p2").
Since Linux interfaces names are limited to 15 characters, these prefixes leave,
for the worst case (TAP tunnels), 9 characters for the actual name.
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2016-11-02 12:18:01 +00:00
|
|
|
gretap_generic_teardown "gre4t-$cfg"
|
2014-07-30 13:22:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
proto_grev6_teardown() {
|
|
|
|
local cfg="$1"
|
|
|
|
}
|
|
|
|
|
|
|
|
proto_grev6tap_teardown() {
|
|
|
|
local cfg="$1"
|
|
|
|
|
gre: add different per-protocol prefixes to GRE-TAP IPv4/6 tunnel interfaces.
This commit modifies the /lib/netifd/proto/gre.sh script so that, when
GRE-TAP tunnels are created, either IPv4 or IPv6, the prefix before the chosen
interface name contains the "tap" substring, to differentiate them from non-TAP
GRE tunnels.
Right now, both GRE and GRE-TAP tunnel (either IPv4 or IPv6) interfaces defined
in /etc/config/network are named equally ("gre-"+$ifname or "grev6"+$ifname)
upon creation. For instance, the following tunnels:
config interface 'tuna'
option peeraddr '172.30.22.1'
option proto 'gre'
config interface 'tunb'
option peeraddr '192.168.233.4'
option proto 'gretap'
config interface 'tunc'
option peer6addr 'fdc5:7c9e:e93d:45af::1'
option proto 'grev6'
config interface 'tund'
option peer6addr 'fdc0:6071:1348:31ff::2'
option proto 'grev6tap'
are named, respectively, "gre-tuna", "gre-tunb", "grev6-tunc" and "grev6-tund".
The current change makes that each GRE tunnel interface of the four different
types available (gre, gretap, grev6 and grev6tap) gets a different prefix.
Therefore, the abovementioned tunnels will be named, respectively:
"gre4-tuna", "gre4t-tunb", "gre6-tunc" and "gre6t-tund".
This is coherent with other types of virtual interfaces (i.e. PPP, PPPoE, PPPoA)
where the whole protocol name is used. For instance, a PPPoA interface named
"p1" and a PPPoE interface named "p2" will respectively appear as "pppoa-p1"
and "pppoe-p2", not as "ppp-p1" and "ppp-p2").
Since Linux interfaces names are limited to 15 characters, these prefixes leave,
for the worst case (TAP tunnels), 9 characters for the actual name.
Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
2016-11-02 12:18:01 +00:00
|
|
|
gretap_generic_teardown "gre6t-$cfg"
|
2014-07-30 13:22:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
gre_generic_init_config() {
|
|
|
|
no_device=1
|
|
|
|
available=1
|
|
|
|
|
|
|
|
proto_config_add_int "mtu"
|
|
|
|
proto_config_add_int "ttl"
|
2014-09-29 18:00:02 +00:00
|
|
|
proto_config_add_string "tos"
|
2014-07-30 13:22:24 +00:00
|
|
|
proto_config_add_string "tunlink"
|
|
|
|
proto_config_add_string "zone"
|
|
|
|
proto_config_add_int "ikey"
|
|
|
|
proto_config_add_int "okey"
|
|
|
|
proto_config_add_boolean "icsum"
|
|
|
|
proto_config_add_boolean "ocsum"
|
|
|
|
proto_config_add_boolean "iseqno"
|
|
|
|
proto_config_add_boolean "oseqno"
|
2016-02-01 12:02:11 +00:00
|
|
|
proto_config_add_boolean "multicast"
|
2014-07-30 13:22:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
proto_gre_init_config() {
|
|
|
|
gre_generic_init_config
|
|
|
|
proto_config_add_string "ipaddr"
|
|
|
|
proto_config_add_string "peeraddr"
|
|
|
|
proto_config_add_boolean "df"
|
|
|
|
}
|
|
|
|
|
|
|
|
proto_gretap_init_config() {
|
|
|
|
proto_gre_init_config
|
|
|
|
proto_config_add_string "network"
|
|
|
|
}
|
|
|
|
|
|
|
|
proto_grev6_init_config() {
|
|
|
|
gre_generic_init_config
|
|
|
|
proto_config_add_string "ip6addr"
|
|
|
|
proto_config_add_string "peer6addr"
|
|
|
|
proto_config_add_string "weakif"
|
|
|
|
}
|
|
|
|
|
|
|
|
proto_grev6tap_init_config() {
|
|
|
|
proto_grev6_init_config
|
|
|
|
proto_config_add_string "network"
|
|
|
|
}
|
|
|
|
|
|
|
|
[ -n "$INCLUDE_ONLY" ] || {
|
|
|
|
[ -f /lib/modules/$(uname -r)/gre.ko ] && add_protocol gre
|
|
|
|
[ -f /lib/modules/$(uname -r)/gre.ko ] && add_protocol gretap
|
|
|
|
[ -f /lib/modules/$(uname -r)/ip6_gre.ko ] && add_protocol grev6
|
|
|
|
[ -f /lib/modules/$(uname -r)/ip6_gre.ko ] && add_protocol grev6tap
|
|
|
|
}
|