[vpnc-devel] man-page and vpnc-script in vpnc-0.3.3
Michael Hunold
hunold at linuxtv.org
Wed Aug 23 20:52:25 CEST 2006
Hello all,
first of all thank you for your great piece of software, vpnc-0.3.3
works flawlessly for me.
Nevertheless I have two small suggestions:
1. The manpage "vpnc.8" is outdated. It speaks about vpnc-connect, but
apparently this got replaced by vpnc-script. This confused me when
trying to figure out how things work.
2. In vpnc-script, there is this section:
------------------schnipp------------------------------
fix_ip_get_output () {
sed 's/cache//;s/metric[0-9]\+ [0-9]\+//g'
}
set_vpngateway_route() {
$IPROUTE route add `ip route get "$VPNGATEWAY" | fix_ip_get_output`
$IPROUTE route flush cache
}
------------------schnipp------------------------------
The output of "ip route get" for exmaple looks like this:
> ip route get 192.168.0.1
192.168.0.1 dev eth0 src 192.168.0.20
cache mtu 1500 advmss 1460 metric 10 64
The regular expression apparently is used to remove the "cache" and
"metric" parts of the output.
For "metric", however, this does not work, because there is a space
between "metric" and the first number following. So the regular
expression should be 's/cache//;s/metric [0-9]\+ [0-9]\+//g'.
(Please note the space between "metric" and "[0-9]\+".
Perhaps this has worked with some versions of "ip", but the version used
in Fedora Core 4 does not like it.
Please CC me if you reply to this mail because I'm not subscribed to the
mailing list.
Best regards
Michael Hunold.
More information about the vpnc-devel
mailing list