RE: IP Masq weirdness

Joseph Gooch (mrwizard@psu.edu)
Mon, 18 Oct 1999 14:23:42 -0400


> -----Original Message-----
> From: kuznet@ms2.inr.ac.ru [mailto:kuznet@ms2.inr.ac.ru]
> Sent: Monday, October 18, 1999 2:16 PM
> To: Joseph Gooch
> Cc: linux-kernel@vger.rutgers.edu
> Subject: Re: IP Masq weirdness
>
>
> 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...

Heh. I knew it was wrong, i was asking if my interpretation was correct :)

> > 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)

Well, I default routed the last ip, so it worked for me on 2.2.10 and
before, so your fix was the direct cause of my setup not working, but the
masq code being broken is the real reason it's not working. I guess I can
forgive you then. :)

Alright. I can attempt to make a patch but I'd rather my kernel not catch
fire. Perhaps the masq coders could look at it? Pretty please? :)

Thanks
Joseph Gooch

-
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/