]> git.pld-linux.org Git - packages/libnl1.git/blob - libnl-1.1-fix-portmap-position.patch
- release 4 (by relup.sh)
[packages/libnl1.git] / libnl-1.1-fix-portmap-position.patch
1 commit ef8ba32e0ca7ac7bbbaf87f6fd7b197af18aed25
2 Author: Inaky Perez-Gonzalez <inaky@linux.intel.com>
3 Date:   Mon Apr 27 14:46:08 2009 -0700
4
5     release_local_port: properly compute the bitmap position
6     
7     Current calculation is always off, not reflecting the right position
8     in the bitmap, which results in failures due to conflicts (detected at
9     the kernel level) when trying to open a new handle.
10     
11     Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
12
13 diff --git a/lib/socket.c b/lib/socket.c
14 index d1874f0..8083bbb 100644
15 --- a/lib/socket.c
16 +++ b/lib/socket.c
17 @@ -79,7 +79,7 @@ static void release_local_port(uint32_t port)
18                 return;
19         
20         nr = port >> 22;
21 -       used_ports_map[nr / 32] &= ~((nr % 32) + 1);
22 +       used_ports_map[nr / 32] &= ~(1 << (nr % 32));
23  }
24  
25  /**
This page took 0.036219 seconds and 3 git commands to generate.