netcfg hang bug in autoconfig.c
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netcfg (Ubuntu) |
Fix Released
|
High
|
Stéphane Graber |
Bug Description
I am working on the Precise alpha (beta?) It appears there is a bug in netcfg's autoconfig.c.
antarus@goats2 ~ $ rdisc6 eth0
Soliciting ff02::2 (ff02::2) on eth0...
Hop limit : 64 ( 0x40)
Stateful address conf. : No
Stateful other conf. : Yes
Router preference : medium
Router lifetime : 1800 (0x00000708) seconds
Reachable time : unspecified (0x00000000)
Retransmit time : unspecified (0x00000000)
Source link-layer address: 00:05:73:A0:00:65
MTU : 1500 bytes (valid)
Prefix : 2620:0:
Valid time : 2592000 (0x00278d00) seconds
Pref. time : 604800 (0x00093a80) seconds
from fe80::5:
We set Stateful Other conf which correctly tells netcfg to try dhcpv6.
Sadly we don't have dhcpv6 set up yet, so dhclient will never receive a lease. netcfg/
in netcfg_dhcpv6(...)
rv = poll_dhcpv6_
while (fgets(l, sizeof(l), dhcpv6_reader) != NULL) {
It looks like the code tries to read from dhcpv6_pipe which is the stdout of the dhclient process. However the client has not actually received any leases (since we don't run dhcpv6) so the output it is expecting will never happen and it will hang on the fgets() call. I think you should check the value of 'rv' to see if we actually got a lease. If we didn't then we shouldn't try to read from the pipe.
Status changed to 'Confirmed' because the bug affects multiple users.