[PATCH 0/2] Continue using generate_local_port() but fallback to kernel automatism

Thomas Haller thaller at redhat.com
Fri Jul 10 05:58:49 PDT 2015


Hi,

How about this? I don't feel well with changing behavior if it can be avoided.
The downside of this approach is that the code is more complicated then removing
generate_local_port() entirely.

Thomas.

Thomas Haller (2):
  socket: clear port when unable to generate local port
  socket: add fallback for nl_connect() by trying to bind to unspecified
    local port

 lib/nl.c     | 29 ++++++++++++++++++-----------
 lib/socket.c | 32 +++++++++++++++++++++-----------
 2 files changed, 39 insertions(+), 22 deletions(-)

-- 
2.4.3




More information about the libnl mailing list