lkml.org 
[lkml]   [1996]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: ircd can't connect to localhost
Date
Colten Edwards once wrote:
>
> On Wed, 13 Mar 1996, Snow Cat wrote:
>
> > Colten Edwards once wrote:
> > >
> > >
> > > Just compiled .73 and anxiously rebooted to see if localhost port trouble
> > > had been solved. No. Damn. This problem has been here since .59 kernel
> > > and someone who knows networking should have a look. (no i am not that
> > > person). localhost irc server no-one on the local system can connect
> >
> > Can you strace ircd and verify that it really binds to INADDR_ANY, not
> > just to host's IP address? Other daemons seam to work fine.
> >
>
> time(NULL) = 826832477
> socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 7
> bind(7, {sin_family=AF_INET, sin_port=htons(0),
> sin_addr=inet_addr("192.0.2.1")}, 16) = 0
> fcntl(7, F_GETFL) = 0x2 (flags O_RDWR)
> fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK) = 0
> setsockopt(7, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
> setsockopt(7, SOL_SOCKET, SO_RCVBUF, [8192], 4) = 0
> setsockopt(7, SOL_SOCKET, SO_SNDBUF, [8192], 4) = 0
>
> What's weird about this is that two servers on the same localhost can
> connect to one another. It's just the clients that cannot.
>

Probably servers connect to the host's IP address rather than INADDR_ANY as
well.

I heard that now, by default, Linux doesn't allow a process to bind to the
same port on several interfaces separately. Anyone knows how to overide this?
In the meanwhile, why not patch ircd to bind to INADDR_ANY - it will work
with every version of Linux?

--
Snow ^oo^ Cat <snowcat@math.CSUFresno.EDU>
_ -> <- aka Oleg Kibirev <oleg@math.CSUFresno.EDU>
___(_) _ _)_
/ _) finger oleg@math.math.CSUFresno.EDU for PGP public key
\_.-._
|___/ Purr!


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