[vpnc-devel] [PATCH] Allow vpn dæmon to specify MTU for vpnc-script

David Woodhouse dwmw2 at infradead.org
Tue Sep 30 09:41:28 CEST 2008


I have written a client for Cisco's AnyConnect (SSL+DTLS) VPN, and I've
made it use vpnc-script because it seems silly to reimplement that.

I would like to be able to specify the MTU in the environment passed to
vpnc-script, because in my case that's negotiated with the server rather
than being directly calculable from the path to the VPN server.

--- vpnc/vpnc-script.in~
+++ vpnc/vpnc-script.in
@@ -84,7 +84,9 @@
 # =========== tunnel interface handling ====================================
 
 do_ifconfig() {
-	if [ -n "$IPROUTE" ]; then
+	if [ -n "$INTERNAL_IP4_MTU" ]; then
+		MTU=$INTERNAL_IP4_MTU
+	elif [ -n "$IPROUTE" ]; then
 		DEV=$($IPROUTE route | grep ^default | sed 's/^.* dev \([[:alnum:]-]\+\).*$/\1/')
 		MTU=$(($($IPROUTE link show "$DEV" | grep mtu | sed 's/^.* mtu \([[:digit:]]\+\).*$/\1/') - 88))
 	else


-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse at intel.com                              Intel Corporation



More information about the vpnc-devel mailing list