Mailing List Archive

bug(s) in vpnc-script
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello list,

vpnc-script has two occurences of
if [ $NETWORK != "0.0.0.0" ];

which is a syntactical error in every bash I tested it with; it has to be
if [ "$NETWORK" != "0.0.0.0" ]; then

Also, I'm worried that no matter how much
IPSEC target network 123.456.123.456/255.255.0.0

I set, the vpnc-script never gets called with CISCO_SPLIT_INC set to 1;
and that's the condition that needs to be fulfilled for the script to
set specific network routes. Could someone verify?

Greetings,
Marcus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTxCajAAoJEBQ6EdjyzlHtiioIAJonbXQVKYrRK1/z5SIOPSYP
EBAdom/HHPG+PvG7jG+TRz6Pw+ojZksLHTTmkZ+ZYvPik9e1ao8FqAwZakkq2nCg
DGH8yDSAfVVY4EpmGSstJx5RnnLZoFNkGwuqWvH3aJDqPB1n2XaLcX/QAIJrLDs7
gxMU9Do2AycrHMDWOLduAm1LzdO+yLt8RXjGuk69eSva9Fi6utfYUrfIZR1k8jiL
kymnLHid72KDJE3J6flVtp4F4g1uZ/5gXVNYmSzEvxtdfJPNhdeqbnLl+uPApWIX
vCmBWSwVHOyaxhnjB0PL/3ZZDQ1s3NFTpIYksnWLKJ7k+9xOVbeV9NHDSML60lo=
=8WB0
-----END PGP SIGNATURE-----
_______________________________________________
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(s) in vpnc-script [ In reply to ]
Maybe you should send this fix to David Woodhouse (dwmw2@infradead.org), as he is maintaining the git repository for vpnc-scripts

Best regards,
Fabian


Am 14.07.2014 um 20:51 schrieb Marcus Müller <marcus@hostalia.de>:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello list,
>
> vpnc-script has two occurences of
> if [ $NETWORK != "0.0.0.0" ];
>
> which is a syntactical error in every bash I tested it with; it has to be
> if [ "$NETWORK" != "0.0.0.0" ]; then
>
> Also, I'm worried that no matter how much
> IPSEC target network 123.456.123.456/255.255.0.0
>
> I set, the vpnc-script never gets called with CISCO_SPLIT_INC set to 1;
> and that's the condition that needs to be fulfilled for the script to
> set specific network routes. Could someone verify?
>
> Greetings,
> Marcus
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJTxCajAAoJEBQ6EdjyzlHtiioIAJonbXQVKYrRK1/z5SIOPSYP
> EBAdom/HHPG+PvG7jG+TRz6Pw+ojZksLHTTmkZ+ZYvPik9e1ao8FqAwZakkq2nCg
> DGH8yDSAfVVY4EpmGSstJx5RnnLZoFNkGwuqWvH3aJDqPB1n2XaLcX/QAIJrLDs7
> gxMU9Do2AycrHMDWOLduAm1LzdO+yLt8RXjGuk69eSva9Fi6utfYUrfIZR1k8jiL
> kymnLHid72KDJE3J6flVtp4F4g1uZ/5gXVNYmSzEvxtdfJPNhdeqbnLl+uPApWIX
> vCmBWSwVHOyaxhnjB0PL/3ZZDQ1s3NFTpIYksnWLKJ7k+9xOVbeV9NHDSML60lo=
> =8WB0
> -----END PGP SIGNATURE-----
> _______________________________________________
> 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(s) in vpnc-script [ In reply to ]
On Mon, 2014-07-14 at 20:51 +0200, Marcus Müller wrote:
> Hello list,
>
> vpnc-script has two occurences of
> if [ $NETWORK != "0.0.0.0" ];
>
> which is a syntactical error in every bash I tested it with; it has to be
> if [ "$NETWORK" != "0.0.0.0" ]; then

It works here as long as $NETWORK is set:

$ NETWORK=0.0.0.0
$ if [ $NETWORK != "0.0.0.0" ]; then echo yes; fi
$ NETWORK=0.0.0.1
$ if [ $NETWORK != "0.0.0.0" ]; then echo yes; fi
yes
$

But it's better to use quotes, especially if it's possible that the
variable will ever be empty or contain something unexpected.

I've pushed the fix:
http://git.infradead.org/users/dwmw2/vpnc-scripts.git/commitdiff/6201ebd5

Thanks.

--
dwmw2