lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 2 Sep 2021 08:27:58 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'David Ahern' <dsahern@...il.com>,
        "'netdev@...r.kernel.org'" <netdev@...r.kernel.org>
Subject: RE: IP routing sending local packet to gateway.

From: David Ahern
> Sent: 02 September 2021 04:38
> 
> On 9/1/21 9:24 AM, David Laight wrote:
> > I've found a script that gets run after the IP address and default route
> > have been added that does:
> >
> > 	SOURCE=192.168.1.88
> > 	GATEWAY=192.168.1.1
> >
> > 	ip rule add from "$SOURCE" lookup px0
> > 	ip rule add to "$SOURCE" lookup px0
> >
> > 	ip route add default via ${GATEWAY} dev px0 src ${SOURCE} table px0
> >
> > The 'ip rule' are probably not related (or needed).
> > I suspect they cause traffic to the local IP be transmitted on px0.
> > (They may be from a strange setup we had where that might have been needed,
> > but why something from 10 years ago appeared is beyond me - and our source control.)
> >
> > Am I right in thinking that the 'table px0' bit is what causes 'Id 200'
> > be created and that it would really need the normal 'use arp' route
> > added as well?
> >
> 
> this is why the fib tracepoint exists. It shows what is happening at the
> time of the fib lookup - inputs and lookup results (gw, device) - which
> give the clue as to why the packet went the direction it did.

They mostly gave me a hint as to where to look.
There are definitely some code paths where a fib entry is
ignored (and it continues to search) that could do with tracing.

But I had to add extra traces to the 'route add' paths to
find what was adding the extra fib table.
Fortunately I've got a serial console setup (into putty)
so I setup ftrace before the network config actually happens.

Anyway the script is trying to do something that would be
better done with a network namespace.

Thanks for the pointers.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ