tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
connect() returns EACCES
Hi
Before I start adding printf in the kernel, anyone has an idea why connect() on
an AF_INET socket can return EACCES?
Here is what I get with ktrace: it makes a AF_INET/SOCK_STREAM socket, calls
setsockopt() for TCP_NODELAY, SO_SNDBUF, SO_RCVBUF, sets O_NONBLOCK on the fd
and attempt to connect:
18105 1 lmp_crunch CALL __socket30(2,1,0)
18105 1 lmp_crunch RET __socket30 15/0xf
18105 1 lmp_crunch CALL setsockopt(0xf,6,1,0x7f7fffffd37c,4)
18105 1 lmp_crunch RET setsockopt 0
18105 1 lmp_crunch CALL setsockopt(0xf,0xffff,0x1001,0x7f7fea00bba8,4)
18105 1 lmp_crunch RET setsockopt 0
18105 1 lmp_crunch CALL setsockopt(0xf,0xffff,0x1002,0x7f7fea00bbac,4)
18105 1 lmp_crunch RET setsockopt 0
18105 1 lmp_crunch CALL fcntl(0xf,3,0)
18105 1 lmp_crunch RET fcntl 2
18105 1 lmp_crunch CALL fcntl(0xf,4,6)
18105 1 lmp_crunch RET fcntl 0
18105 1 lmp_crunch CALL connect(0xf,0x7f7fffffd3a0,0x10)
18105 1 lmp_crunch MISC mbsoname: [10.110.99.3]
18105 1 lmp_crunch RET connect -1 errno 13 Permission denied
What is really odd is that I see many other similar calls in the ktrace that do
not produce EACCES, but EINPROGRESS instead. I do not see where the difference
is.
18105 1 lmp_crunch CALL __socket30(2,1,0)
18105 1 lmp_crunch RET __socket30 11/0xb
18105 1 lmp_crunch CALL setsockopt(0xb,6,1,0x7f7fffffd16c,4)
18105 1 lmp_crunch RET setsockopt 0
18105 1 lmp_crunch CALL setsockopt(0xb,0xffff,0x1001,0x7f7ff2e0ec68,4)
18105 1 lmp_crunch RET setsockopt 0
18105 1 lmp_crunch CALL setsockopt(0xb,0xffff,0x1002,0x7f7ff2e0ec6c,4)
18105 1 lmp_crunch RET setsockopt 0
18105 1 lmp_crunch CALL fcntl(0xb,3,0)
18105 1 lmp_crunch RET fcntl 2
18105 1 lmp_crunch CALL fcntl(0xb,4,6)
18105 1 lmp_crunch RET fcntl 0
18105 1 lmp_crunch CALL connect(0xb,0x7f7fffffd1f0,0x10)
18105 1 lmp_crunch MISC mbsoname: [10.110.99.3]
18105 1 lmp_crunch RET connect -1 errno 36 Operation now in progress
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index