# Traffic Selectors
- # Local Prefixes
- if isset LOCAL_PREFIX; then
- print_indent 4 "local_ts = $(list_join LOCAL_PREFIX ,)"
- else
- print_indent 4 "local_ts = dynamic"
- fi
+ case "${MODE}" in
+ gre-*)
+ print_indent 4 "local_ts = dynamic[gre]"
+ print_indent 4 "remote_ts = dynamic[gre]"
+ ;;
+ *)
+ # Local Prefixes
+ if isset LOCAL_PREFIX; then
+ print_indent 4 "local_ts = $(list_join LOCAL_PREFIX ,)"
+ else
+ print_indent 4 "local_ts = dynamic"
+ fi
- # Remote Prefixes
- if isset REMOTE_PREFIX; then
- print_indent 4 "remote_ts = $(list_join REMOTE_PREFIX ,)"
- else
- print_indent 4 "remote_ts = dynamic"
- fi
+ # Remote Prefixes
+ if isset REMOTE_PREFIX; then
+ print_indent 4 "remote_ts = $(list_join REMOTE_PREFIX ,)"
+ else
+ print_indent 4 "remote_ts = dynamic"
+ fi
+ ;;
+ esac
print
# Netfilter Marks
case "${PLUTO_VERB}" in
up-client)
case "${MODE}" in
+ gre-*)
+ if ! device_exists "${INTERFACE}"; then
+ ip_tunnel_add "${INTERFACE}" \
+ --mode="gre" \
+ --local-address="${TUNNEL_ADDRESS}" \
+ --remote-address="${TUNNEL_PEER}"
+
+ device_set_up "${INTERFACE}"
+ fi
+ ;;
vti)
if device_exists "${INTERFACE}"; then
ip_tunnel_change_keys "${INTERFACE}" \