]> granicus.if.org Git - libnl/commit
socket: fix assertion in nl_connect() when all ports are already in use
authorThomas Haller <thaller@redhat.com>
Mon, 24 Aug 2015 15:57:16 +0000 (17:57 +0200)
committerThomas Haller <thaller@redhat.com>
Mon, 24 Aug 2015 16:01:42 +0000 (18:01 +0200)
commiteaa75b7c7d3e6a4df1a2e7591ae295acfae3f73e
treed51183750257a529143d6ef89d2fd55641f6e56c
parentfa380b409a02fe17b2d5cfc9074a8913523dbb68
socket: fix assertion in nl_connect() when all ports are already in use

When generating a port fails a few times (because they are already in used
outside of libnl's knowledge), we would back off generating a local
port and instead let kernel decide.

There was however a bug in nl_connect() that caused an assertion:

    BUG at file position socket.c:147:_nl_socket_used_ports_release_all
    app: socket.c:147: _nl_socket_used_ports_release_all: Assertion `0' failed.

Fixes: 96e1e5bdc2e803700055395cc3c428fa2525d1ca
include/netlink-private/socket.h
lib/nl.c
lib/socket.c