1
0
forked from ports/opt
opt/libnl/libnl-1.1-fix_port_tracking.patch
Juergen Daubert 3b27d95fb0 Revert "libnl: update to 3.2.17"
This reverts commit 8e99773fbe2fa96310c5dd11ac12666660c1c636.
2013-01-25 21:54:41 +01:00

28 lines
952 B
Diff

From ef8ba32e0ca7ac7bbbaf87f6fd7b197af18aed25 Mon Sep 17 00:00:00 2001
From: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Date: Mon, 27 Apr 2009 14:46:08 -0700
Subject: [PATCH] release_local_port: properly compute the bitmap position
Current calculation is always off, not reflecting the right position
in the bitmap, which results in failures due to conflicts (detected at
the kernel level) when trying to open a new handle.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
---
lib/socket.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Index: libnl-1.1/lib/socket.c
===================================================================
--- libnl-1.1.orig/lib/socket.c 2010-11-17 02:55:53.070669985 +0100
+++ libnl-1.1/lib/socket.c 2010-11-17 02:58:07.970667329 +0100
@@ -153,7 +153,7 @@
return;
nr = port >> 22;
- used_ports_map[nr / 32] &= ~((nr % 32) + 1);
+ used_ports_map[nr / 32] &= ~(1 << nr % 32);
}
/**