network: add virtual tunnel interface (VTI) support
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 17 Jan 2016 11:06:02 +0000 (11:06 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 17 Jan 2016 11:06:02 +0000 (11:06 +0000)
commita969a4455b70479e3953f83c444b7b4c9d2506b9
tree20a792a87eb516fd5bf515a922e2209a4c00693f
parent8937275cb965ff59dfa0aa655037344869de0d1a
network: add virtual tunnel interface (VTI) support

This adds support for configuring VTI interfaces within /etc/config/network.
VTI interfaces are used to create IPsec tunnel interfaces. These interfaces
may be used for routing and other purposes.

Example config:
config interface 'vti1'
option proto 'vti'
option mtu '1500'
option tunlink 'wan'
option peeraddr '192.168.5.16'
option zone 'VPN'
option ikey 2
option okey 2

config interface 'vti1_static'
option proto 'static'
option ifname '@vti1'
option ipaddr '192.168.7.2/24'

The options ikey and okey correspond to the fwmark value of a ipsec policy.
The may be null if you do not want fwmarks.
Also peeraddr may be 0.0.0 if you want all ESP packets go through the
interface.
Example strongswan config:
conn vti
left=%any
leftcert=peer2.test.der
leftid=@peer2.test
right=192.168.5.16
rightid=@peer3.test
leftsubnet=0.0.0.0/0
rightsubnet=0.0.0.0/0
mark=2
auto=route

Signed-off-by: André Valentin <avalentin@marcant.net>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48274 3c298f89-4303-0410-b956-a3cf2f4a3e73
package/network/config/vti/Makefile [new file with mode: 0644]
package/network/config/vti/files/vti.sh [new file with mode: 0755]