Opened 7 years ago

Closed 6 years ago

#3152 closed enhancement (complete)

PD: Prefix assignment in DHCPv6 server (solicit, request)

Reported by: tomek Owned by: tomek
Priority: medium Milestone: Sprint-DHCP-20131016
Component: dhcp6 Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

Once #3145, #3149, #3150, #3151 are done, DHCPv6 server code should be extended to assign prefixes for incoming requests.

Subtickets

Change History (9)

comment:1 Changed 7 years ago by tomek

  • Milestone changed from DHCP Outstanding Tasks to Sprint-DHCP-20130918
  • Owner set to tomek
  • Status changed from new to accepted

comment:2 Changed 6 years ago by tomek

  • Owner changed from tomek to UnAssigned
  • Status changed from accepted to reviewing

The ticket is available for review.

The test of unit-tests for PD is not as extensive as it is for NA. However, given the time constraints I think we should not spend too much time on unit-testing, but rather focus on functional tests. We may expand our unit-test coverage later.

comment:3 Changed 6 years ago by tomek

Please note that the code is branched from trac3171 rather than from master.

comment:4 Changed 6 years ago by tomek

  • Milestone changed from Sprint-DHCP-20130918 to Sprint-DHCP-20131016

comment:5 Changed 6 years ago by stephen

  • Owner changed from UnAssigned to stephen

comment:6 follow-up: Changed 6 years ago by stephen

  • Owner changed from stephen to tomek

Reviewed commit 0d5c7903522b79906cb0335006d678911af1eee8

I've made minor changes to wording and spacing in some files and pushed the change to the repository.

src/bin/dhcp6/dhcp6_srv.cc
Dhcpv6Srv::assignIA_PD: setting fake_allocation is more simply done by:

bool fake_allocation = (query->getType() == DHCPV6_SOLICIT);

As ia_rsp is initialized in the same way if the subnet is present or not (with an empty IA_PD option), the initialization could be done once, at the head of the method (before the subnet is checked).

src/lib/dhcpsrv/tests/test_libraries.h
This is created from the test_libraries.h.in file when the code is built. I don't think it should be in the git repository. (Admittedly I don't think its addition was part of the ticket.)

(None of these suggested changes is mandatory.)

comment:7 in reply to: ↑ 6 Changed 6 years ago by tomek

  • Owner changed from tomek to stephen

Replying to stephen:

Reviewed commit 0d5c7903522b79906cb0335006d678911af1eee8

I've made minor changes to wording and spacing in some files and pushed the change to the repository.

Thank you.

src/bin/dhcp6/dhcp6_srv.cc
Dhcpv6Srv::assignIA_PD: setting fake_allocation is more simply done by:

bool fake_allocation = (query->getType() == DHCPV6_SOLICIT);

Updated. The code will eventually be expanded a bit when we start supporting rapid-commit, but until then let's keep things simple.

As ia_rsp is initialized in the same way if the subnet is present or not (with an empty IA_PD option), the initialization could be done once, at the head of the method (before the subnet is checked).

Done.

src/lib/dhcpsrv/tests/test_libraries.h
This is created from the test_libraries.h.in file when the code is built. I don't think it should be in the git repository. (Admittedly I don't think its addition was part of the ticket.)

This file was added by mistake. It is already removed on master, so there's no need to remove it here. I would probably only create a merge conflict.

Thanks for the very quick review.

comment:8 Changed 6 years ago by stephen

  • Owner changed from stephen to tomek

Reviewed commit a0e73dd74658f2deb22fad2c7a1f56d122aa9021

All OK, please merge.

comment:9 Changed 6 years ago by tomek

  • Resolution set to complete
  • Status changed from reviewing to closed

Thanks a lot. Merged.

We now should have a functional PD support on master!

Note: See TracTickets for help on using tickets.