Have #ip protocol's connect()s throw errors
authorBarret Rhoden <brho@cs.berkeley.edu>
Sat, 13 Feb 2016 17:06:23 +0000 (12:06 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Sun, 14 Feb 2016 14:03:21 +0000 (09:03 -0500)
commit887b050283daf8fe1d07802d0024a0b9e015eb27
tree8b55acf492c7717d301460eddf7e2fc768bc14e8
parentbff8df931dc3f78d7eadf326a43818d7bf543e53
Have #ip protocol's connect()s throw errors

A couple extra things:

Fsstdbind and Fsstdannounce have temporary waserror shims, until those
get changed.  I needed to change setladdrport to throw, and these needed
to catch it for now.

udpconnect() was the only connect method to call Fsconnected() even if
Fsstdconnect() failed.  All of the others just return immediately.  A
potential effect of Fsconnected() is that it calls rendez_wake on the
"connection rendez" in the conversation (c->cr).  It might be the case
that someone could be sleeping, and we fail to wake them up.  Perhaps a
connect or announce succeeded, but then we failed with this connect, and
now we don't wake anyone.

Given that udpannounce is structured the same as the other connects
(doesn't call Fsconnected() on error), and the qlocks on the CV for
connect and announce, I think this can't happen.  And if it does, then
we just need to fix this connect/announce mess to make it not happen
globally.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/include/ip.h
kern/src/net/devip.c
kern/src/net/icmp.c
kern/src/net/icmp6.c
kern/src/net/ipifc.c
kern/src/net/tcp.c
kern/src/net/udp.c