bind/connect: correct behaviour?

Roderich Schupp (rsch@ExperTeam.de)
Sun, 07 Feb 1999 16:15:43 +0100


Hi,
while investigating why some LPRng hang when there's no spooler
running I stumbled over the following strace. Note: before the
bind, there's nobody listening on local port 515 and there
are no socket relevant syscalls between the bind and connect:

1054 bind(5, {sin_family=AF_INET,
sin_port=htons(515),
sin_addr=inet_addr("0.0.0.0")}, 16) = 0
...
1054 connect(5, {sin_family=AF_INET,
sin_port=htons(515),
sin_addr=inet_addr("127.0.0.1")}, 16) = 0

Obviously the process has just connected to itself
on port 515 - though it never did an accept(). Is this to be expected?
This is with kernel 2.2.1.

Cheers, Roderich

-- 
             "Report all obscene mail to your Potsmaster"

Roderich Schupp mailto:rsch@ExperTeam.de ExperTeam GmbH http://www.experteam.de/ Munich, Germany linux:2.2.1

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