Skip to content
  • Dimitris Aragiorgis's avatar
    Fix bug that causes nfdhcpd to freeze · 8d3dcc3b
    Dimitris Aragiorgis authored
    
    
    nfdhcpd opens a socket during init. socket.send() blocks in case
    SO_SNDBUF is full. This might happen when packages are pushed to
    buffer but never consumed (e.g. VM is shuting down).
    
    To fix this we use non-blocking send with MSG_DONTWAIT and catch
    the error when the resource is not available.
    
    In order to empty the socket buffer we close the socket and re-open it.
    To this end we need CAP_NET_RAW capability otherwise operation
    (socket.socket()) is not permitted.
    
    Add various logging messages (during client creation, opening a
    socket, etc.)
    
    Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
    8d3dcc3b