commit | c9d3edd2d77c09f5f25d2261a83f5a430db3b005 | [log] [tgz] |
---|---|---|
author | Rich Lane <rlane@bigswitch.com> | Wed Oct 09 00:21:01 2013 -0700 |
committer | Rich Lane <rlane@bigswitch.com> | Wed Oct 09 00:21:01 2013 -0700 |
tree | 141dc2b90ba684cb149d42f7f36c1930059a9013 | |
parent | 49b323f18f7fe07d8743a5a81cd20474a508c2c1 [diff] |
controller: serialize calls to socket.sendall The sendall method is not atomic. Concurrent calls may end up with their data interleaved on the socket. This is especially likely when the socket buffer fills up, causing sendall to call select(2) between writes. I noticed this bug when installing many flows. The echo reply sent by the controller thread ended up in the middle of a flow mod.