Hi
I'm seeing some problems on master. I haven't check against an older version yet as it's quite a job moving between v7 and v8 but if this doesn't ring a bell for anyone I'll try that next. I've spent a lot of time tracing network code already.
1. SO_RCVTIMEO not working.
I set SO_RCVTIMEO on a UDP socket but the recvfrom hangs indefinitely while no data is received. It's waiting on ir_sem because nothing runs inet_udp_eventhandler to let the timeout code run. If I comment out the devif_event_trigger test in devif_conn_event to run the handler on Ethernet driver polls (which it doesn't normally accept) this works around the problem and the timeout code runs correctly.
As an aside setsockopt appears to clear the s_options SO_RCVTIMEO bit if a timeout is set and vice versa. That looks backwards to me, although I don't think that bit is used directly other than by getsockopt.
2. TCP close not working.
If I call close on a TCP socket it does not send a FIN | ACK and then hangs up waiting for the response. If I close the other end it receives the FIN | ACK which it interprets as a response and finishes closing the socket.
I'm guessing many people would be shouting about them if these were really network stack bugs but I've no idea what else I might be missing. Any thoughts appreciated.
Thanks
Rob