Bug 677526 - port allocation/deallocation is wrong [in libnl-1.1-12]
Summary: port allocation/deallocation is wrong [in libnl-1.1-12]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libnl
Version: 14
Hardware: Unspecified
OS: Linux
high
urgent
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-15 04:45 UTC by Stefan Berger
Modified: 2011-05-09 03:54 UTC (History)
2 users (show)

Fixed In Version: libnl-1.1-14.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 677725 (view as bug list)
Environment:
Last Closed: 2011-04-12 21:24:10 UTC


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.