diff options
author | Anthony Ruhier <anthony.ruhier@gmail.com> | 2015-01-11 19:47:17 +0100 |
---|---|---|
committer | Jouke Witteveen <j.witteveen@gmail.com> | 2015-01-12 22:08:40 +0100 |
commit | cf675b4ab8e56267b56e2d8bc2a30f87f3502abb (patch) | |
tree | 23d7d04962caa8cd121bf2bb5694b43bc9edd014 | |
parent | 0cc69f13c2355831e8f07962c072c09ca35fd5f3 (diff) | |
download | netctl-cf675b4ab8e56267b56e2d8bc2a30f87f3502abb.tar.gz netctl-cf675b4ab8e56267b56e2d8bc2a30f87f3502abb.tar.xz |
Add support for keys to tunnel connections
Only relevant for GRE tunneling.
-rw-r--r-- | docs/examples/tunnel (renamed from docs/examples/tunnel-he-ipv6) | 9 | ||||
-rw-r--r-- | docs/netctl.profile.5.txt | 3 | ||||
-rw-r--r-- | src/lib/connections/tunnel | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/docs/examples/tunnel-he-ipv6 b/docs/examples/tunnel index 2a19406..feb3976 100644 --- a/docs/examples/tunnel-he-ipv6 +++ b/docs/examples/tunnel @@ -1,10 +1,13 @@ -Description='An example ipv6 tunnel with Hurricane Electric' -Interface=he-ipv6 +Description='Example tunnel connection' +Interface=tun-ipv6 Connection=tunnel -Mode='sit' +Mode=sit Remote='216.66.80.26' #Local='172.16.0.1' +## Optional key in case of Mode=gre +#Key=1234 + IP6=static Address6='2001:470:1f08:d87::2/64' Routes6=('::/0') diff --git a/docs/netctl.profile.5.txt b/docs/netctl.profile.5.txt index 82946da..212bbb7 100644 --- a/docs/netctl.profile.5.txt +++ b/docs/netctl.profile.5.txt @@ -461,6 +461,9 @@ the *ip options*, the following are understood for connections of the 'Remote=':: The address of the remote end of the tunnel. +'Key=' [requires 'Mode=gre']:: + A key identifying an individual traffic flow within a tunnel. + OPTIONS FOR `tuntap' CONNECTIONS -------------------------------- diff --git a/src/lib/connections/tunnel b/src/lib/connections/tunnel index 6f35793..927f7f4 100644 --- a/src/lib/connections/tunnel +++ b/src/lib/connections/tunnel @@ -14,7 +14,7 @@ tunnel_up() { [[ $Mode == *ip6* || $Mode == "any" ]] && family="-6" do_debug ip "$family" tunnel add "$Interface" mode "$Mode" \ - remote "$Remote" ${Local+local "$Local"} || return + remote "$Remote" ${Local:+local "$Local"} ${Key:+key "$Key"} || return bring_interface_up "$Interface" ip_set |