Bug 599633 - libdhcp don't work if nics indexes are not uninterruptedly.
libdhcp don't work if nics indexes are not uninterruptedly.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libdhcp (Show other bugs)
5.5
All Linux
low Severity medium
: rc
: ---
Assigned To: David Cantrell
Release Test Team
:
: 705301 (view as bug list)
Depends On:
Blocks: 726828
  Show dependency treegraph
 
Reported: 2010-06-03 12:34 EDT by Alexander Malyarenko
Modified: 2012-02-21 00:34 EST (History)
3 users (show)

See Also:
Fixed In Version: libdhcp-1.20-12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-21 00:34:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
change while(i<=nitems) to nl_cache_get_first and nl_cache_get_next (1.61 KB, text/plain)
2010-06-03 12:34 EDT, Alexander Malyarenko
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0193 normal SHIPPED_LIVE libdhcp bug fix update 2012-02-20 09:54:15 EST

  None (edit)
Description Alexander Malyarenko 2010-06-03 12:34:38 EDT
Created attachment 419439 [details]
change while(i<=nitems) to nl_cache_get_first and nl_cache_get_next

Description of problem:
libdhcp don't work if nics indexes are not uninterruptedly. For example on my system I have, sit0 with index 1, lo with index 1, eth0 with index 4, but nic_get_links can't find my eth0 nic in this case.

# ./nl-tctree-dump
lo loopback 00:00:00:00:00:00 mtu 16436 <loopback,up,>
    txqlen 0 weight 0 qdisc noqueue index 2 brd 00:00:00:00:00:00
eth0 ether 00:0c:29:4e:64:53 mtu 1500 <broadcast,multicast,up,>
    txqlen 1000 weight 64 qdisc pfifo_fast index 4 brd ff:ff:ff:ff:ff:ff
  pfifo_fast qdisc dev eth0 handle none parent none bands 3
    refcnt 1 priomap [1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1]
              besteffort => 1                0x8 => 1
                  filler => 2                0x9 => 1
                    bulk => 2                0xa => 1
                     0x3 => 2                0xb => 1
        interactive_bulk => 1                0xc => 1
                     0x5 => 2                0xd => 1
             interactive => 0                0xe => 1
                 control => 0                0xf => 1
sit0 sit 0.0.0.0 mtu 1480 <noarp>
    txqlen 0 weight 0 qdisc noop index 1 brd 0.0.0.0

Attached patch fix this problem
Comment 1 Alexander Malyarenko 2010-06-03 12:50:21 EDT
I take libdhcp src.rpm from centos 5.5
Comment 5 RHEL Product and Program Management 2011-08-05 08:29:57 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 6 David Cantrell 2011-08-19 14:49:09 EDT
*** Bug 705301 has been marked as a duplicate of this bug. ***
Comment 8 Jan Stodola 2012-01-03 06:48:37 EST
Reproduced on RHEL-5.7 (libdhcp-1.20-11.el5, nash-5.1.19.6-71.el5):

[root@gilliam ~]# cd /sys/class/net/
[root@gilliam net]# for i in *; do echo -n "$i: "; cat $i/ifindex; done
eth0: 4
lo: 1
sit0: 3
[root@gilliam net]# nash
(running in test mode).
Red Hat nash version 5.1.19.6 starting
network --device eth0 --bootproto dhcp
waiting for link... 0 seconds.
Sending request for IP information through eth0
nic_get_links (343): No such file or directory

nic_get_links (343): No such file or directory

nic_by_name: no interface named eth0 found
dhcp_nic: net_get_by_name(eth0) failed
ERROR: Interface setup failed: pumpSetupInterface failed: get link - 19: No such device.


Verified with libdhcp-1.20-13.el5 and nash-5.1.19.6-75.el5:

[root@gilliam ~]# cd /sys/class/net/
[root@gilliam net]# for i in *; do echo -n "$i: "; cat $i/ifindex; done
eth0: 4
lo: 1
sit0: 3
[root@gilliam net]# nash
(running in test mode).
Red Hat nash version 5.1.19.6 starting
network --device eth0 --bootproto dhcp
waiting for link... 0 seconds.
Sending request for IP information through eth0
Listening on LPF/eth0/00:1c:c4:12:fc:30
Sending on   LPF/eth0/00:1c:c4:12:fc:30
Sending on   Socket/fallback
DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid=0x3b7c8a44)
DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid=0x3b7c8a44)
DHCPACK from 10.10.36.113 (xid=0x3b7c8a44)
bound to 10.10.9.126 -- renewal in 42906 seconds.
DHCPv4 eth0 - obtained lease 10.10.9.126
DHCPv4 eth0 - option subnet-mask: 255.255.252.0
DHCPv4 eth0 - option subnet-mask - prefix_len: 22 broadcast: 10.10.11.255
DHCPv4 eth0 - option routers:
[root@gilliam net]#


Moving to VERIFIED.
Comment 9 errata-xmlrpc 2012-02-21 00:34:40 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0193.html

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