#3201 closed defect (complete)
Options with no data fields and containing sub options are not parsed correctly
Reported by: | marcin | Owned by: | marcin |
---|---|---|---|
Priority: | high | Milestone: | Kea0.8 |
Component: | dhcp4 | Version: | |
Keywords: | Cc: | ||
CVSS Scoring: | Parent Tickets: | ||
Sensitive: | no | Defect Severity: | High |
Sub-Project: | DHCP | Feature Depending on Ticket: | |
Estimated Difficulty: | 0 | Add Hours to Ticket: | 0 |
Total Hours: | 0 | Internal?: | no |
Description
Options which contain no data fields but containing sub options only are defined as ''empty'' options which encapsulate certain option space. Unfortunately, the ''empty'' options do not assume any sub options. Therefore, sub options in options such as RAI are not parsed at all. We should either have a dedicated class to represent such options or leverage some other existing class (like OptionCustom?) to encapsulate such options (and guarantee that sub options are unpacked).
Subtickets
Change History (5)
comment:1 Changed 6 years ago by marcin
- Owner set to UnAssigned
- Status changed from new to reviewing
comment:2 Changed 6 years ago by tomek
- Owner changed from UnAssigned to tomek
comment:3 Changed 6 years ago by tomek
- Owner changed from tomek to marcin
Please update BIND10 guide and add RFC3046 to the list of supported
RFCs.
libdhcp++_unittest.cc
OPTION_AGENT_CIRCUIT_ID, OPTION_REMOTE_ID, OPTION_VSI,
OPTION_CMTS_CAPS, OPTION_CM_MAC should be moved to src/lib/dhcp/dhcp4.h and
src/lib/dhcp/docsis3_option_defs.h. The OPTION_CMTS_CAPS and OPTION_CM_MAC should
have some prefix indicating that it is a DOCSIS3 option. In general they should
follow whatever name convention is there in docsis3_option_defs.h.
option_custom_unittest.cc
hasV4Suboption() and hasV6Suboption() may simply return boolean.
You can report issues with ADD_FAILURE() << "something wrong";
This is shorter. But if you prefer to keep the AssertionResult?, I
won't object it.
Changelog should explicitly mention that RAI option is now working
properly. People may not immediately understand what the changelog
means. How about:
[bug] marcin libdhcp++: Options with defined suboptions are now handled properly. In particular, Relay Agent Info options is now echoed back properly. (Trac #3102, git abc)
comment:4 Changed 6 years ago by tomek
- Resolution set to complete
- Status changed from reviewing to closed
Changes pushed to trac3201, ticket merged to master, closing.
comment:5 Changed 6 years ago by tomek
- Milestone changed from Sprint-DHCP-20131016 to DHCP-Kea1.0-alpha
The empty option with suboptions is now encapsulated by OptionCustom (which is a generic type of option supporting many formats). I also extended unit tests to check that OptionCustom unpacks suboptions correctly for different option formats.
Proposed ChangeLog: