Bug 625770

Summary: Wrong config options for dhcp-client (rfc3442-classless-static-routes_raw)
Product: [openSUSE] openSUSE 11.3 Reporter: Vladimir Perepechin <vovochka13>
Component: NetworkAssignee: Marius Tomaschewski <mt>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: ast, forgotten_1tdUli2dGL, mt
Version: Final   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 11.3   
Whiteboard: maint:released:11.3:35062
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Deadline: 2010-09-06   
Attachments: Possible patch renaming the option 121 to rfc3442-classless-static-routes

Description Vladimir Perepechin 2010-07-26 23:25:10 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; ru; rv:1.9.2.6) Gecko/20100626 SUSE/3.6.6-1.2 Firefox/3.6.6

If fact, with such config, retrieving routes via dhcp doesn't work (for NetworkManager).
It's work fine for ifup because ifup uses dhcpcd instead of dhcp-cleint.

rfc3442-classless-static-routes_raw must be change to rfc3442-classless-static-routes than everything works fine.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Bin Li 2010-08-04 10:09:07 UTC
Marius,

 So why we use 'rfc3442-classless-static-routes_raw' while not 'rfc3442-classless-static-routes' or 'new_rfc3442_classless_static_routes'? Any reason for this?
Comment 2 Marius Tomaschewski 2010-08-04 12:12:28 UTC
The reason is, that I've defined this option with _raw in the /etc/dhclient.conf:

option rfc3442-classless-static-routes_raw code 121 = array of unsigned integer 8;

for /sbin/dhclient-script used by ifup when it is configured to use dhclient
(default is dhcpcd, but 11.3 ifup-dhcp can use also dhclient and dhclient6).

The dhclient (binary) does not do any processing of this option as it does
for all another options and it is passed as space separated bytes to the
dhclient-script. For example the routes:
    192.168.2.0/24   via 192.168.1.2
    default          via 192.168.1.1
are passed as "24 192 168 3 192 168 1 2 0 192 168 1 1" to dhclient-script.


In the past NetworkManager was not using the /etc/dhclient.conf, but an own
config file instead passed via -cf option.

Is NetworkManager on 11.3 using /etc/dhclient.conf now and is there upstream
code in the NetworkManager, that expects it with same name but without _raw?
Comment 3 Marius Tomaschewski 2010-08-04 12:43:54 UTC
Created attachment 380545 [details]
Possible patch renaming the option 121 to rfc3442-classless-static-routes

Assuming the answer to both parts of the question in comment #2 is "yes":

This would be the !untested! patch renaming it / removing the _raw suffix.
Comment 4 Marius Tomaschewski 2010-08-04 16:02:06 UTC
Bin Li,
see above. The patch works for me and is applied in

$OBS/home:mtomaschewski:branches:openSUSE:11.3:Update:Test/dhcp

IMO we can rename it when it fixes the problem. Let me know -- there
is also a another fix for the dhcp server in the queue.

Vladimir,
can you test (it needs a little bit time to build) the package at

http://download.opensuse.org/repositories/home:/mtomaschewski:/branches:/openSUSE:/11.3:/Update:/Test/openSUSE_11.3_Update_Test/

Thanks for your report!
Comment 5 Vladimir Perepechin 2010-08-04 22:31:35 UTC
Yes, everything works fine for me :)
Comment 6 Bin Li 2010-08-05 03:18:26 UTC
(In reply to comment #2)
> The reason is, that I've defined this option with _raw in the
> /etc/dhclient.conf:
> 
> option rfc3442-classless-static-routes_raw code 121 = array of unsigned integer
> 8;
> 
> for /sbin/dhclient-script used by ifup when it is configured to use dhclient
> (default is dhcpcd, but 11.3 ifup-dhcp can use also dhclient and dhclient6).
> 
> The dhclient (binary) does not do any processing of this option as it does
> for all another options and it is passed as space separated bytes to the
> dhclient-script. For example the routes:
>     192.168.2.0/24   via 192.168.1.2
>     default          via 192.168.1.1
> are passed as "24 192 168 3 192 168 1 2 0 192 168 1 1" to dhclient-script.
> 
> In the past NetworkManager was not using the /etc/dhclient.conf, but an own
> config file instead passed via -cf option.
Yes, /var/run/nm-dhclient-eth0.conf was used, but merge from dhclient.conf

> Is NetworkManager on 11.3 using /etc/dhclient.conf now and is there upstream
> code in the NetworkManager, that expects it with same name but without _raw?
Yes, without _raw in upstream.
Comment 7 Bin Li 2010-08-05 03:55:33 UTC
I don't have the environment for test, I'll reply it later after my reporters reply it.
Comment 8 Bin Li 2010-08-05 03:56:15 UTC
Forward to maintainer.
Comment 9 Bin Li 2010-08-06 03:08:47 UTC
Marius,

 Thanks. It works fine now. I wish it could be in updates. +1.
Comment 10 Bin Li 2010-08-06 03:10:39 UTC
*** Bug 623409 has been marked as a duplicate of this bug. ***
Comment 11 Marius Tomaschewski 2010-08-06 13:44:24 UTC
Mr Maintenance,

except of this compatibility fix in the config + adoption of dhclient-script,
there is also (merge error) fix for ldap options in dhcp-server in the queue:
bug #625358

I'd like to release them as update together (both are 11.3+ only issues).

+1 from me too :-)
Comment 12 Marcus Meissner 2010-08-06 14:30:55 UTC
well, i think it is fine for an update. +1
Comment 13 Swamp Workflow Management 2010-08-09 16:09:03 UTC
The SWAMPID for this issue is 35054.
This issue was rated as low.
Please submit fixed packages until 2010-09-06.
Also create a patchinfo file using this link:
https://swamp.suse.de/webswamp/wf/35054
Comment 14 Christian Dengler 2010-08-09 16:09:40 UTC
+1

Update started.
Comment 15 Marius Tomaschewski 2010-08-11 10:01:45 UTC
OK, fixed. Patchinfo and a package are submitted:

 45246  State:new     By:mtomaschewski When:2010-08-10T09:52:06
        submit:       home:mtomaschewski:branches:openSUSE:11.3:Update:Test/dhcp  ->  openSUSE:11.3:Update:Test   
        Descr: fixes for SWAMPID 35054

SUMMARY: dhcp-server ldap support fix, NetworkManager dhcp-client classless route option compatibility
DESCRIPTION:
- #625358: Fixed ldap option number inconsistence causing a conflict with new 4.x options in the dhcp-server.
- #625770: Renamed rfc3442-classless-static-routes_raw in /etc/dhclient.conf to rfc3442-classless-static-routes for compatibility with the NetworkManager making use of /etc/dhclient.conf now and adopted /sbin/dhclient-script to use the new option variable.
Comment 16 Swamp Workflow Management 2010-08-17 11:02:21 UTC
Update released for: dhcp, dhcp-client, dhcp-client-debuginfo, dhcp-debuginfo, dhcp-debugsource, dhcp-devel, dhcp-doc, dhcp-relay, dhcp-relay-debuginfo, dhcp-server, dhcp-server-debuginfo
Products:
openSUSE 11.3 (debug, i586, x86_64)