[LARTC] Fwmark problem - policy routing does not work.

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 27 Apr 2002, Adrian Chung wrote:

> On Sat, Apr 27, 2002 at 10:25:24AM +0200, Arthur van Leeuwen wrote:
> > On Fri, 26 Apr 2002, Adrian Chung wrote:
> >
> > > When you add a route that sets a src like:
> > >
> > > ip route add table <table> 192.168.1.0/24 src 192.168.1.11 dev eth0
> > >
> > > The "src" doesn't specify the source IP to put in the packet (it's not
> > > network address translation, like SNAT in iptables), it just specifies
> > > which local source IP the routing mechanisms should use to determine
> > > where to route the packet.
> >
> > Actually, it is more subtle than that. The 'src' *does* specify the source
> > IP to put in the packet *if* the packet doesn't have a source IP yet. This
> > only holds true for packets generated locally.
>
> Ah okay, that makes sense...  But I think in both our cases the
> packets were generated locally, so the 'src' flag should have set the
> source IP.
>
> Is it possible for the application (telnet in my case) to explicitly
> bind to a socket and set it's source IP?  That could explain why the
> rule has no effect since by the time the packet reaches the routing
> system, it already has a source IP set.

Yes, that is possible.

Doei, Arthur.

-- 
  /\    / |      arthurvl@sci.kun.nl      | Work like you don't need the money
 /__\  /  | A friend is someone with whom | Love like you have never been hurt
/    \/__ | you can dare to be yourself   | Dance like there's nobody watching



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux