Netdev List
 help / color / mirror / Atom feed
* Packet not rerouting via different bridge interface after modifying destination IP in TC ingress hook
@ 2020-08-05  8:19 Swarm NameRedacted
  2020-08-05 13:39 ` Andrew Lunn
  0 siblings, 1 reply; 7+ messages in thread
From: Swarm NameRedacted @ 2020-08-05  8:19 UTC (permalink / raw)
  To: netdev

Hi,

I am trying to build a quick script via TC direct action and eBPF to
modify the destination IP of a packet so that it is routed through a
different bridge interface. Made a quick network diagram below to
demonstrate it. 

      Packet (dst: 10.10.3.2)
                |
                |
    ingress - (change dst to 10.10.4.1)
                |
                |
               eth0
                |
                |
      br0 - (addr: 10.10.3.1)
__eth0______   ___ens19_______
     |                |
     |                |
     |                |
     |                |
host: 10.10.4.1  host: 10.10.3.2



As shown, I send a packet from a separate client to eth0. eth0 is the
WAN interface of its machine and ens19 is the LAN interface; both are
connecting with bridge br0. Without modification, the packet goes
straight through ens19 to 10.10.3.2. 

Theoretically, by modifying the destination IP to 10.10.4.1 at ingress,
the packet should be rerouted to go back through eth0. However, in
practice, I find that the packet still goes through ens19 after
modification, and of course after that it never reaches anything. 

Why is it that ingress catches the packet before the bridging decision,
but the packet isn't rerouted? Is there a better way to do this?



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-08-06 11:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-05  8:19 Packet not rerouting via different bridge interface after modifying destination IP in TC ingress hook Swarm NameRedacted
2020-08-05 13:39 ` Andrew Lunn
2020-08-05 20:12   ` Swarm NameRedacted
2020-08-06  6:33     ` Ido Schimmel
2020-08-06  7:00       ` Swarm NameRedacted
2020-08-06  7:49         ` Ido Schimmel
2020-08-06  8:33           ` Swarm NameRedacted

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox