Filters.

26 views
Skip to first unread message

Michael Thorsager

unread,
Nov 8, 2012, 2:44:40 AM11/8/12
to jagornet-d...@googlegroups.com
I'm messing about with creating a setup in which I would like to choose a address-pool for a 
client based on a suboption in the Vendor-specific Information (17).. My thoughts is that it 
is not possible in the current implementation, but any pointers would be nice..

In my missing around I was looking at filtering on Vendor Class (16) .. but I found something 
a bit strange .. the DhcpVendorClassOption.maches(..) method always returns false??

//mit

Greg Rabil

unread,
Nov 8, 2012, 8:19:49 PM11/8/12
to jagornet-d...@googlegroups.com
Generally, the flow is that the client identifies itself as being of a certain Vendor type using the VendorClass option (16), and then the server returns special data for that vendor type of client in the Vendor Specific Info option (17).  So, you probably would not choose an address-pool for a client based on a suboption in the Vendor-Specific Info option (17), because I would think that it would be rare for a client to send option 17.  Due to that assumed use-case, there is no matches() implementation in DhcpVendorInfoOption to make use of in a filter to choose a certain pool.  However, it should be possible to support this if such clients exist that send option 17.

You *should* be able to filter using DhcpVendorClass option (16), as that is the typical use case.  However, as you have discovered, the DhcpVendorClassOption.matches() implementation is broken.  A bug will be entered for this issue.  Once again, I appreciate you finding and reporting any issues you have.

Thanks again,
Greg

Greg Rabil

unread,
Nov 8, 2012, 10:05:59 PM11/8/12
to jagornet-d...@googlegroups.com
Actually, I now recall that the DhcpVendorClassOption.matches() implementation was not completed because the issue is related to the way to define this filter in the configuration.  The VendorClass option includes an Enterprise Number preceding the list of opaque data options.  The current OptionExpression defintion does not really support that, which is unfortunate.  We will investigate a solution to this problem.

Regards,
Greg
Reply all
Reply to author
Forward
0 new messages