Re: [PATCH] ipv4: fix fib metrics

Alessandro Suardi
2011-05-28T22:00:18Z

[-- Attachment #1: Type: text/plain, Size: 1309 bytes --]

On Fri, May 27, 2011 at 11:27 AM, David Woodhouse <dwmw2@infradead.org> wrote:
> On Fri, 2011-03-25 at 02:25 +0100, Alessandro Suardi wrote:
>>
>> ...which didn't take that long - one last bugging question and I'm happily
>>  off to sleep; does ipid always come in the form of 0x followed by four
>>  bytes representing hex values ? In a perhaps inelegant but working way
>>  (I'm now writing through the VPN tunnel),
>>
>>   sed 's/cache//;s/metric \?[0-9]\+ [0-9]\+//g;s/hoplimit
>> [0-9]\+//g;s/ipid 0x....//g'
>>
>>  appears to be Work For Me (TM).
>
> Please could I have a tested patch for vpnc-script?
>
> It now lives in its own repository at
> git://, http://git.infradead.org/users/dwmw2/vpnc-scripts.git because
> it's used by openconnect too, and has had various bug fixes for
> cross-platform support and IPv6 since it was forked from vpnc.

I downloaded the git version and checked - the one I use is the Fedora
version which seems updated to perhaps two revisions behind git...
anyway, attaching (in order to not mangle whitespace) the one-liner
change that I've been using since without issues - to the point that I
actually forgot having patched the script...

--alessandro

"There's always a siren singing you to shipwreck"

(Radiohead, "There There")

[-- Attachment #2: vpnc-script.diff --]
[-- Type: application/octet-stream, Size: 410 bytes --]

--- vpnc-scripts-9239bd8/vpnc-script 2010-02-23 19:11:53.000000000 +0100
+++ vpnc-scripts-new/vpnc-script 2011-05-28 23:49:28.000000000 +0200
@@ -139,7 +139,7 @@

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() {