Skip to contentSkip to conversation

New: iproute2: socket lookup after policy-based local route returns "connect: Invalid argument"

Bugme-new Andrew Morton 1 participant 1 message Aug 20, 2009 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

#1 lore raw

(switched to email. Please respond via emailed reply-to-all, not via the bugzilla web interface).

Quoted 41 lines · On Wed, 19 Aug 2009 08:55:44 GMT [email protected] wrote:

http://bugzilla.kernel.org/show_bug.cgi?id=14007

Summary: iproute2: socket lookup after policy-based local route
returns "connect: Invalid argument"
Product: Networking
Version: 2.5
Kernel Version: 2.6.31
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: IPV4
AssignedTo: [email protected]
ReportedBy: [email protected]
Regression: No

I want to add policy based routes to my local machine similar to the iptables redirect command. With this it is possible to redirect connections without losing the destination ip.
So i tried to add an route of type local to another routing table then table local:

sudo ip route add local 192.168.33.0/24 dev eth0 table local ping 192.168.33.1 -c 1
#working

sudo ip route add local 192.168.34.0/24 dev eth0 table main ping 192.168.34.1 -c 1
#connect: Invalid argument

The first one is working, the secound one not. The only difference is another routing table. icmp is only an example, tcp and udp doesnt work neither.

I guess somewhere in the socketlookup linux checks the destination ip with the local routes only in the local table. perhaps the other tables are missed.

btw: i tried it on every linux with iproute2 i found. with no succeed