[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFd0U8WBDCzoKrV1FR-tqpXF6bFhMK+5oxC=tVuaBfKg7EmE4Q@mail.gmail.com>
Date: Fri, 4 Oct 2024 11:57:00 -0400
From: Ryan Raymond <ryanray@...ch.edu>
To: netdev@...r.kernel.org
Subject: IP Forward src address cannot match network interface address Inbox
Hello, all
I am working on a Linux networking project. I have two interfaces:
tun0: Address 10.1.0.1
eth0: Address 141.14.41.4
I want to write to tun0 (from userspace) so that packets are
transmitted through my virtual network and out eth0 onto the internet.
I can do that easily if I say that the source address is something
random, like 1.2.3.4, but if the source address matches any interface
(e.g. 10.1.0.1, 141.14.41.4) the packets are not transmitted.
I think this is a routing issue with RTNETLINK, since you can also
test this with route:
$ ip route get 1.1.1.1
1.1.1.1 via 141.14.41.4 dev eth0 src 141.14.41.4 uid 1000
cache
$ ip route get 1.1.1.1 from 1.2.3.4 iif eth0
1.1.1.1 from 1.2.3.4 via 141.14.41.4 dev eth0
cache iif eth0
$ ip route get 1.1.1.1 from 10.1.0.1 iif eth0
RTNETLINK answers: Invalid argument
$
Does anyone know what to do about this?
Please put my address ryanray@...ch.edu in the address field since I
am not subbed to this mailing list.
Thanks,
Ryan
Powered by blists - more mailing lists