Using Kernel 2.6.39 and later, it may occur that vpnc spits out the following error message

Error: either "to" is duplicate, or "ipid" is a garbage.

This isn’t really an error in this case, because vpnc uses some regex and sed to extract the output of ip route get – but that has changed.

In order to fix this (source), replace line 119.

# vim /etc/vpnc/vpnc-script
:119

                #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'
%d bloggers like this: