mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nadav Har'El" <nyh@math.technion.ac.il>
To: Andrey Savochkin <saw@saw.sw.com.sg>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Bug in nonlocal-bind (transparent proxy)?
Date: Fri, 8 Jun 2001 11:02:37 +0300	[thread overview]
Message-ID: <20010608110237.A1911@leeor.math.technion.ac.il> (raw)
In-Reply-To: <20010607170825.A18760@leeor.math.technion.ac.il> <20010608014443.A28407@saw.sw.com.sg>
In-Reply-To: <20010608014443.A28407@saw.sw.com.sg>; from saw@saw.sw.com.sg on Fri, Jun 08, 2001 at 01:44:43AM -0400

On Fri, Jun 08, 2001, Andrey Savochkin wrote about "Re: Bug in nonlocal-bind (transparent proxy)?":
> On Thu, Jun 07, 2001 at 05:08:25PM +0300, Nadav Har'El wrote:
> Hi,
> > Bind()ing a non-local address worked fine in the 2.2 line of kernels if a
> > certain compile-time option was enabled (TRANSPARENT_PROXY, or something
> > like that). But it no longer seems to be working in the 2.4 kernels (I
> > tried this on 2.4.2 coming from the Redhat 7.1 distribution).
> 
> It's not a bug, it's willful.

I don't understand what is willful: why does the ip_nonlocal_bind sysctl
exist if it doesn't help? Getting bind() to work (which is what
ip_nonlocal_bind does) but later not being able to connect() this socket
isn't very useful...

> To make a custom kernel where you can use non-local addresses more freely,
> find source address checks in ip_route_output_slow() and get rid of all of
> them except considering
> 	MULTICAST(saddr) || BADCLASS(saddr) || ZERONET(saddr) ||
> 		saddr == htonl(INADDR_BROADCAST)
> as invalid.

Thanks for the idea - I'll try doing that, and see if it works.

Is there any special reason why, instead of that ip_nonlocal_bind that doesn't
work, we don't have instead a compile-time variable (obviously a run-time
sysctl or socket-specific option would be even better) which enables both
ip_nonlocal_bind and the hacks needed to get connect() to work?

-- 
Nadav Har'El                        |       Friday, Jun  8 2001, 17 Sivan 5761
nyh@math.technion.ac.il             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |A conscience does not prevent sin. It
http://nadav.harel.org.il           |only prevents you from enjoying it.

  reply	other threads:[~2001-06-08  8:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-07 14:08 Nadav Har'El
2001-06-08  5:44 ` Andrey Savochkin
2001-06-08  8:02   ` Nadav Har'El [this message]
2001-06-08  8:25   ` David S. Miller
2001-09-03 10:12   ` Transparent proxy support in 2.4 - revisited Nadav Har'El
2001-09-03 10:44     ` Andrey Savochkin
2001-09-03 13:16       ` Nadav Har'El
2001-09-03 13:55         ` Andrey Savochkin
2001-09-03 16:43           ` Julio Sanchez Fernandez
2001-09-03 20:07         ` Nerijus Baliunas
2001-09-03 22:50     ` Alexey Kuznetsov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010608110237.A1911@leeor.math.technion.ac.il \
    --to=nyh@math.technion.ac.il \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saw@saw.sw.com.sg \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®