lkml.org 
[lkml]   [1999]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: IP Masq weirdness
Date
Hello!

> ums->maddr = ip_masq_select_addr(dev, rt->rt_gateway,
> RT_SCOPE_UNIVERSE);
...
> Doesn't this look up the output device, then choose an address for the local
> connection from the device list, but base it on the gateway instead of the
> destination? Is that correct?

No, it is _not_ correct! As I understand this algo was borrowed from
ip_forward.c without thinking. It must be simply ums->maddr=rt->rt_src
in this case. Even more, as I see, the code loses maddr passed by caller
somewhere and it is just crime...


> It looks like the devinet change will just select the first ip now instead
> of the last (2.2.10). Not sure what that was fixed for.

It was bug. People expected the first address and I expected it too,
only did this silly mistake. 8)8)

Alexey

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.094 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site