Bug 677526

Summary: port allocation/deallocation is wrong [in libnl-1.1-12]
Product: [Fedora] Fedora Reporter: Stefan Berger <stefanb>
Component: libnlAssignee: Dan Williams <dcbw>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: high    
Version: 14CC: dcbw, nhorman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: libnl-1.1-14.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 677725 (view as bug list) Environment:
Last Closed: 2011-04-12 21:24:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Stefan Berger 2011-02-15 04:45:50 UTC
Description of problem:

port allocation (socket.c ; line 134):
used_ports_map[i] |= (1UL << n);

- that's going to set a bit

port deallocation (socket.c; line 156) :
used_ports_map[nr / 32] &= ~((nr % 32) + 1);


- that's going to produce garbage [no wonder things don't work]


used_ports_map[nr / 32] &= ~(1 << (nr % 32));

or

used_ports_map[nr / 32] &= ~(1 << (nr & 0x1f));

- would probably be much better 




Version-Release number of selected component (if applicable):

libnl-1.1-12.fc14.x86_64
libnl-debuginfo-1.1-12.fc14.x86_64
libnl-devel-1.1-12.fc14.x86_64

Comment 1 Dan Williams 2011-03-21 19:39:05 UTC
Looks like this got fixed upstream; I'll backport that patch which is exactly what you suggest.

commit ef8ba32e0ca7ac7bbbaf87f6fd7b197af18aed25
Author: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Date:   Mon Apr 27 14:46:08 2009 -0700

    release_local_port: properly compute the bitmap position

Comment 2 Fedora Update System 2011-03-21 19:48:31 UTC
libnl-1.1-14.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/libnl-1.1-14.fc15

Comment 3 Fedora Update System 2011-03-21 19:56:05 UTC
libnl-1.1-14.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/libnl-1.1-14.fc14

Comment 4 Fedora Update System 2011-03-21 20:09:03 UTC
libnl-1.1-14.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/libnl-1.1-14.fc13

Comment 5 Fedora Update System 2011-04-12 21:24:00 UTC
libnl-1.1-14.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2011-04-12 21:31:42 UTC
libnl-1.1-14.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2011-05-09 03:54:37 UTC
libnl-1.1-14.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.