Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[RFCs 6334, 6603, 7598] Additional native option support #24
I work for Qualitance and I've been working on implementing RFCs 6334, 6603, 7598 and refactored the option engine to natively support option definitions previously specified in kea.conf.
I've also added support for recursive encapsulations of options. I've stumbled upon a problem with encapsulated options created with default global option spaces ( "dhcp4", "dhcp6" ). It seems like Option::getEncapsulatedSpace()) is used to reference the option's own space and this causes it to try to encapsulate all global options. This was not an issue before because there was only one level of encapsulation. I've provided a temporary workaround in CfgOption::encapsulateOptions(), but the actual fix should be a separation between option space and encapsulated space.
Hi Andrei! Thanks for PR. Apologies for not getting back to this earlier, but our schedule for upcoming Kea 1.1 is very tight and we have only limited time available for any unplanned features. Having said that, I'd love to see this patch included in 1.1.
As I said, I have not reviewed it extensively, but looking at the code I have 3 comments so far:
As for the separation of option-space and encapsulated-space, I need to talk with Marcin and will get back to you.
Thanks for the update. I just downloaded the code, compiled it and tried to load an example config file with custom options. It does not work on this code, but works on master. I used ea-cfg3-options-custom.json, available here: https://github.com/sysrepo/sysrepo-plugin-kea/blob/master/kea-configs/kea-cfg3-options-custom.json.
Sadly, I'm preparing for upcoming hackathon and IETF meeting, so will not be able to debug the issue anytime soon :(
Just to let everyone know... I am currently working on this pull request. There seem to be three changes: 1) replacing "dhcpX" with DHCPX_OPTION_SPACE, 2) Implementation of the Exclude Prefix option, 3) Significant rework of the option spaces etc.
I am porting those changes separately into internal branch in that order 1), 2), 3). The 1) and 2) seem to be straight forward and I don't see why we shouldn't apply them, except that they still require a lot of work, i.e. lack of doxygen comments or invalid comments, lack of unit tests or insufficient unit tests, some of the virtual methods not implemented (and required) for Option6PDExclude etc. I am addressing most of those issues for 1) and 2) on my own, because it is often easier to fix them than to point them out.
The 3) change is a significant rework of libdhcp++. To some extent it is a revolution. I realize that there are some things with respect to encapsulated options that may not work correctly but I am also not sure that the selected approach isn't going to far. Once I address 1) and 2) I will make careful review of that approach and we may have some further discussions about it.
For the time being, please be informed that this pull request is being worked on and refrain from additional updates and reviews.
There is one outstanding issue with the Prefix Exclude processing, i.e. it doesn't quite work with the host reservations, because host reservations can be created outside of any pool. We'll need a separate effort/ticket to cover that.
The proposed documentation seems to have many todos (is incomplete). The patch that you have sent includes some changes to the documentation that don't apply. So, it seems that there may be a gap between the HEAD of your repo and the patch, which introduced the documentation I can't see. Can you please send me a diff for doc/guide/* files based on the latest Kea code (taken from master of isc-projects/kea repo)?
Finally, I have a couple of comments regarding the scale of your changes. I spent a lot of time going through this code to review it and fix it. Partly, the problem was that you had combined (at least) 3 different features in a single pull request. I had to decouple those changes, and sometimes there is no clear way to decouple them, because two features can affect a single file. If I like the feature A, but not B, I have to manually remove/modify the parts of the file that pertain to feature B. This is really tedious work. It would be much more efficient if this effort was split into 3 or 4 pull requests. In the future, please try to make sure the code changes are small enough that you'd not feel the pain yourself trying to review it. ;-)
But, many thanks for your efforts and I am looking forward to your response regarding the documentation.
Hi, Sorry to reply so late. First of all: I added a bunch of unit tests (required for any new code). Thank you so much for that. I wasn't terribly pleased with the amount of changes affecting libdhcp++. I
realize that you guys wanted to make it more generic, but this should not really be a part of this effort. I reduced the number of changes affecting libdhcp++ to the reasonable minimum.
We kept the generic functions in our copy of the code and plan to come back with a pull request containing the rest of the changes.
I also modified the code changes pertaining to Prefix Exclude stuff in the DHCPv6 server. Rather than process ORO option multiple times, it is better to record the fact that the client has requested the Prefix Exclude option when we're processing ORO option for the first time. The same pertains to the pool search (which is quite expensive operation). The Allocation Engine records the pool during prefix allocation so it doesn't need to be looked up again to place the Prefix Exclude Option.
Thank you for this as well. The efficiency of the code is really impressive. The proposed documentation seems to have many todos (is incomplete). The
patch that you have sent includes some changes to the documentation that don't apply. So, it seems that there may be a gap between the HEAD of your repo and the patch, which introduced the documentation I can't see. Can you please send me a diff for doc/guide/* files based on the latest Kea code (taken from master of isc-projects/kea repo)?
Looking at the diff, I can see we have changes which are not pertinent to the enhancement like updated DTD references or table formatting. We gathered such style changes and some minor fixes we want to submit and will provide it in a following email today. Finally, I have a couple of comments regarding the scale of your changes. I
spent a lot of time going through this code to review it and fix it. Partly, the problem was that you had combined (at least) 3 different features in a single pull request. I had to decouple those changes, and sometimes there is no clear way to decouple them, because two features can affect a single file. If I like the feature A, but not B, I have to manually remove/modify the parts of the file that pertain to feature B. This is really tedious work. It would be much more efficient if this effort was split into 3 or 4 pull requests. In the future, please try to make sure the code changes are small enough that you'd not feel the pain yourself trying to review it. ;-)
This is useful feedback. We will keep it in mind. We've taken this advice on the current set of pull requests, we've separated functionalities so that there are about 14 pull requests. I forgot to also ask you to system test the code on 'github24' branch to
make sure that it still does what it should after my changes.
We haven't had the time to system test it yet, but upon doing so we will notify you with the results. We will write to you shortly, Qualitance…
On Fri, Nov 4, 2016 at 11:04 PM, Marcin Siodelski ***@***.***> wrote: Guys, Once again thanks for submitting the patch. Your changes and my further changes have now been merged to the master branch. Closing the pull request. Please give it a try. Marcin — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#24 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ASvBhQSvWgNnxNSkZ_lkEWJiHQKXQCR5ks5q653zgaJpZM4I4PeH> .
-- *Andrei Pavel* | junior c++ developer | QUALITANCE™ *RO:* +40 (748) 220 135 | *office:* +40 (372) 944 741 Opera Center bldg. 2, fl. 7-8, 2 Dr. Nicolae D. Staicovici, Bucharest 050556 <https://www.google.ro/maps/place/QUALITANCEfirstname.lastname@example.org,26.079464,17z/data=!4m6!1m3!3m2!1s0x40b1ff173c5bc0b9:0x7226343f810c7ede!2sQUALITANCE!3m1!1s0x40b1ff173c5bc0b9:0x7226343f810c7ede?hl=ro> email@example.com | www.qualitance.com a Deloitte Technology Fast 50 <http://www2.deloitte.com/content/dam/Deloitte/global/Documents/About-Deloitte/central-europe/CE_Fast_50_2015.pdf> company | ranked in the Inc. 5000 Europe <http://www.inc.com/inc5000eu/list/2016/> for 2016 -- The information contained in this email is confidential. It is intended only for the stated addressee and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in another way use or reply to the information contained in this email. Such unauthorised use may be unlawful. If you have received this email in error, please notify the sender immediately and delete all copies from your computer and network.