Bug 341

Summary: Patch to modify DHCP client to support vendorinfo
Product: Busybox Reporter: Nikos Mavrogianopoulos <nmav>
Component: NetworkingAssignee: unassigned
Status: RESOLVED FIXED    
Severity: enhancement CC: busybox-cvs
Priority: P5    
Version: 1.14.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: Patch to modify DHCP client to support static routes and vendorinfo
static routes patch
suboptions patch (needs more work)
suboptions patch (needs more work)

Description Nikos Mavrogianopoulos 2009-05-21 13:25:12 UTC
Created attachment 341 [details]
Patch to modify DHCP client to support static routes and vendorinfo

The attached patch modifies the DHCP client to support the DHCP options: (1) static routes and (2) vendorinfo. The static routes are being exported in a variable "sroutes" that contains a list such as "NETWORK1 NETMASK1 GATEWAY1 NETWORK2 NETMASK2 GATEWAY2". The Vendor info is being exported in a variable "vendorinfo_option1" where option1 is the suboption found (only option1 is supported as text option).
Comment 1 Denys Vlasenko 2009-07-03 15:04:07 UTC
Created attachment 441 [details]
static routes patch
Comment 2 Denys Vlasenko 2009-07-03 15:04:37 UTC
Created attachment 443 [details]
suboptions patch (needs more work)
Comment 3 Denys Vlasenko 2009-07-03 16:16:28 UTC
Static routes patch is committed to git. Thanks.

What is this suboption thing? Where is it used?
Comment 4 Nikos Mavrogianopoulos 2009-07-06 06:54:44 UTC
The vendor info structure can be used to receive vendor specific data that some servers advertise.
Comment 5 Denys Vlasenko 2009-07-06 19:11:55 UTC
Created attachment 449 [details]
suboptions patch (needs more work)
Comment 6 Denys Vlasenko 2009-07-06 19:17:02 UTC
(In reply to comment #4)
> The vendor info structure can be used to receive vendor specific data that some
> servers advertise.

I understand that. I was asking about more details. What is the format of this data? Can you give example(s) what some vendors put there?

The patch for that is not so nice technically (uses large structure on the stack. why?). It also lacks any comments. What is "option1"? Is it a real suboption name? It sounds strange.

Check out current git and see how OPTION_STATIC_ROUTES was explained in the comments. You need to do something like that for OPTION_SUBOPTIONS.
Comment 7 Nikos Mavrogianopoulos 2009-07-20 13:08:22 UTC
Actually it is not standard what a provider might put there. The providers we partner with usually put text data there to indicate local stuff (e.g. ACS server). That is the reason I used option1 as name for the field.
Comment 8 Denys Vlasenko 2009-08-22 18:59:04 UTC
Edited bug description - static routes patch is in git now. Vendor info patch is not.
Comment 9 Denys Vlasenko 2010-08-11 22:27:01 UTC
I believe with recent addition of arbitrary hex options this can be done without further modifying the code. Closing.