Mailing List Archive

Re: Bug#640978: vpnc-script requires an update for recent iproute
On Fri, Sep 9, 2011 at 2:31 PM, Jason White <jason@jasonjgw.net> wrote:
> Package: vpnc
> Version: 0.5.3r449-2.1
> Severity: normal
>
> The provided vpnc-script is not compatible with recent versions of iproute,
> apparently, as the output format has changed corresponding to version 2.6.39
> and later of the kernel. (It isn't clear to me whether the change was in the
> kernel itself or in the iproute package, based on the information cited
> below.)
> This is the bug described here:
> http://aptosid.com/index.php?name=PNphpBB2&file=viewtopic&t=1295
> and the work-around given on that page comprises the following patch, which I
> have tested and which solved the problem for me.
>
> diff --git a/vpnc/vpnc-script b/vpnc/vpnc-script
> index 64be38c..4c5e27a 100755
> --- a/vpnc/vpnc-script
> +++ b/vpnc/vpnc-script
> @@ -116,7 +116,7 @@ destroy_tun_device() {
>
>  if [ -n "$IPROUTE" ]; then
>        fix_ip_get_output () {
> -               sed 's/cache//;s/metric \?[0-9]\+ [0-9]\+//g;s/hoplimit [0-9]\+//g'
> +               sed 's/cache//;s/metric \?[0-9]\+[0-9]\+//g;s/hoplimit[0-9]\+//g;s/ipid 0x....//g'
>        }
>
>        set_vpngateway_route() {
>
> -- System Information:
> Debian Release: wheezy/sid
>  APT prefers unstable
>  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 3.0.0-1-amd64 (SMP w/4 CPU cores)
> Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/bash
>
> Versions of packages vpnc depends on:
> ii  libc6        2.13-18
> ii  libgcrypt11  1.5.0-3
> ii  libgnutls26  2.12.10-1
>
> Versions of packages vpnc recommends:
> ii  iproute  20110629-1
>
> Versions of packages vpnc suggests:
> pn  resolvconf  <none>
>
> -- Configuration Files:
> /etc/vpnc/example.conf [Errno 13] Permission denied: u'/etc/vpnc/example.conf'
> /etc/vpnc/vpnc-script [Errno 13] Permission denied: u'/etc/vpnc/vpnc-script'
>
> -- no debconf information

Hi Jason,
I added in copy the list vpnc-devel.

In the fix you provide,
1) you add ";s/ipid 0x....//g" at the end of string.
This does not impact backward compatibility. I'm in favour to commit it.
Could you please provide, as reference, the output of "ip" command
that contains the string "ipid 0x...."? Better if together with the
full command line of "ip".
2) you remove one blank space between "[0-9]\+" and "[0-9]\+".
Is it correct, or just a bad copy-paste?
The link in your mail points to a similar fix, but it keeps the blank space.

Thanks and Best Regards,
Antonio Borneo
_______________________________________________
vpnc-devel mailing list
vpnc-devel@unix-ag.uni-kl.de
https://lists.unix-ag.uni-kl.de/mailman/listinfo/vpnc-devel
http://www.unix-ag.uni-kl.de/~massar/vpnc/
Re: Bug#640978: vpnc-script requires an update for recent iproute [ In reply to ]
On Sat, 2011-09-10 at 15:52 +0800, Antonio Borneo wrote:
>
> In the fix you provide,
> 1) you add ";s/ipid 0x....//g" at the end of string.
> This does not impact backward compatibility. I'm in favour to
> commit it.

It's not sufficient. We originally had this in the vpnc-scripts.git
repository¹ since about May, but then the iproute command grew *more*
unrecognised output options so we have since changed it to be 'opt-in'
instead of 'opt-out'².

I was just thinking that I should submit a patch which removes the
out-of-date script from vpnc altogether. There have been a number of
other fixes in the git tree too.

--
dwmw2

¹ http://git.infradead.org/users/dwmw2/vpnc-scripts.git/shortlog
² http://git.infradead.org/users/dwmw2/vpnc-scripts.git/commitdiff/4deaaf9a32
Re: Bug#640978: vpnc-script requires an update for recent iproute [ In reply to ]
David, Antonio, Eric:

On Sat, Sep 10, 2011 at 09:45:17AM +0100, David Woodhouse wrote:
> On Sat, 2011-09-10 at 15:52 +0800, Antonio Borneo wrote:
> >
> > In the fix you provide,
> > 1) you add ";s/ipid 0x....//g" at the end of string.
> > This does not impact backward compatibility. I'm in favour to
> > commit it.
>
> It's not sufficient. We originally had this in the vpnc-scripts.git
> repository¹ since about May, but then the iproute command grew *more*
> unrecognised output options so we have since changed it to be 'opt-in'
> instead of 'opt-out'².

> ¹ http://git.infradead.org/users/dwmw2/vpnc-scripts.git/shortlog
> ² http://git.infradead.org/users/dwmw2/vpnc-scripts.git/commitdiff/4deaaf9a32

is there a reason why this improved patch should not be applied to SVN
as well as to the Debian package of vpnc? Corrected for fuzz, that would
be

--- a/vpnc-script.in
+++ b/vpnc-script.in
@@ -116,7 +116,8 @@ destroy_tun_device() {

if [ -n "$IPROUTE" ]; then
fix_ip_get_output () {
- sed 's/cache//;s/metric \?[0-9]\+ [0-9]\+//g;s/hoplimit [0-9]\+//g'
+ sed -e 's/ /\n/g' | \
+ sed -ne '1p;/via/{N;p};/dev/{N;p};/src/{N;p};/mtu/{N;p}'
}

set_vpngateway_route() {


> I was just thinking that I should submit a patch which removes the
> out-of-date script from vpnc altogether. There have been a number of
> other fixes in the git tree too.

What do you mean "remove" the script from vpnc - how would routes pushed
from the concentrator be configured on the client without this script?


From my point of view, vpnc without this patch is severely broken - it's
not just "not working", it also leaves networking in a non-working state
after it has been terminated regularly. Ubuntu managed to release with
the version currently in Debian, which causes some trouble to support,
and I'd like to make sure that the version in Debian at least works on
Debian when Ubuntu syncs for their upcoming LTS release.

Florian
_______________________________________________
vpnc-devel mailing list
vpnc-devel@unix-ag.uni-kl.de
https://lists.unix-ag.uni-kl.de/mailman/listinfo/vpnc-devel
http://www.unix-ag.uni-kl.de/~massar/vpnc/