Bug 643845

Summary: DHCPd doesn't start with slp-service-scope option (infinite loop)
Product: [openSUSE] openSUSE 11.3 Reporter: J Rosink <jrosink>
Component: OtherAssignee: Marius Tomaschewski <mt>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Patch that should fix the loop

Description J Rosink 2010-10-05 15:23:57 UTC
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 ( .NET CLR 3.5.30729)

I'm using the official OpenSuse 11.3 ISC DHCP version 4.1.1.P1 package but have some issues with it. The DHCP server itself works by-design with about 2700 subnet declarations, Dynamic DNS with TSIG, several custom DHCP options etc, etc (manual configuration, no Yast). But the same behaviour is seen after clean package install with basic configuration.

The moment I add a single SLP Service Scope DHCP option the DHCP service fails to start. It doesn't matter where, global or subnet section, I configure this option the results are the same: 

After starting the DHCP server the init script "hangs" infinite while the CPU is running at 100%. When I _remove_ this SLP option from the dhcp configuration the server functions correctly again. 


This only occurs with the slp-service-scope option:

option slp-service-scope true "SLP-SCOPE";


The directory-agent option has NO issues:

option slp-directory-agent true 1.2.3.4 5.6.7.8;


Reproducible: Always

Steps to Reproduce:
1. Add dhcp option to /etc/dhcpd.conf : option slp-service-scope true "SLP-SCOPE";
2. Restart dhcpd
3. Wait endlessly 
Actual Results:  
ncs-02:~ # /etc/init.d/dhcpd start
Starting ISC DHCPv4 4.x Server

(...Endless Wait...)

Expected Results:  
ncs-02:~ # /etc/init.d/dhcpd start
Starting ISC DHCPv4 4.x Server [chroot]                                                                                                  done
ncs-02:~ #
Comment 1 Marius Tomaschewski 2010-10-27 14:28:08 UTC
Created attachment 397319 [details]
Patch that should fix the loop


I've reported it upstream with the attached patch: ISC-Bugs #22410

-----------------------------------------------------------------------

The loop happens in parse_option_data function trying to parse optional
values:
                do {
                        if (*fmt == 'o')
                                continue;

                        if (!parse_option_token...

                        fmt++;
                } while (*fmt != '\0');

Further, the parse_option_token function called there, reads the semicolon
when there is no value (just "option slp-service-scope true;"), that is
expected to be read in the parse_option_statement.