Opened 3 years ago

Closed 17 months ago

#3573 closed enhancement (complete)

Use options defined for a given host when responding to a DHCPv6 client

Reported by: tomek Owned by: marcin
Priority: medium Milestone: Kea1.1
Component: host-reservations Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 24 Add Hours to Ticket: 1
Total Hours: 12 Internal?: no

Description (last modified by marcin)

Once #3571 is done, we will need to update appendRequestedOptions() method (or other part of the DHCPv6) to include those options.
Several cases will need to be covered here:
send options from subnet if there are no options in host scope (or there is no host definition)
send options from host if present, even if there are options with the same code specified in subnet
In other words, options defined in host scope should override options from subnet.

Subtickets

Change History (18)

comment:1 Changed 3 years ago by hschempf

  • Priority changed from medium to low

comment:2 Changed 3 years ago by tomek

  • Milestone changed from Kea0.9.1beta to Kea0.9.1

Moving from 0.9.1beta to 0.9.1.

comment:3 Changed 3 years ago by hschempf

  • Priority changed from low to very low

comment:4 Changed 3 years ago by hschempf

  • Milestone changed from Kea0.9.1 to Kea0.9.2

comment:5 Changed 3 years ago by hschempf

  • Milestone changed from Kea0.9.2 to Kea1.0
  • Priority changed from very low to medium

comment:6 Changed 2 years ago by hschempf

  • Priority changed from medium to high

Per decision during ticket estimates, changed to High

comment:7 Changed 2 years ago by stephen

  • Milestone changed from Kea1.0 to DHCP Outstanding Tasks

Per the Kea planning meeting in October, remove from 1.0.

comment:8 Changed 2 years ago by tomek

  • Milestone changed from DHCP Outstanding Tasks to Outstanding Tasks

Milestone renamed

comment:9 Changed 2 years ago by tomek

  • Milestone changed from Outstanding Tasks to Kea1.1

comment:10 Changed 22 months ago by tomek

  • Component changed from dhcp6 to host-reservations

comment:11 Changed 22 months ago by tomek

  • Priority changed from high to medium

comment:12 Changed 18 months ago by marcin

  • Description modified (diff)
  • Owner set to marcin
  • Status changed from new to accepted

comment:13 Changed 18 months ago by marcin

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

This ticket is now ready for review.

Proposed ChangeLog entry:

11XX.	[func]		marcin
	DHCPv6 server assigns DHCP options specified for hosts. Host
	specific options take precedence over class specific options,
	subnet specific options and global options.
	(Trac #3573, git abcd)

comment:14 Changed 18 months ago by marcin

  • Add Hours to Ticket changed from 0 to 8
  • Estimated Difficulty changed from 0 to 24
  • Total Hours changed from 0 to 8

comment:15 Changed 18 months ago by tomek

  • Owner changed from UnAssigned to tomek

comment:16 Changed 17 months ago by tomek

  • Owner changed from tomek to marcin

host_unittest.cc

Line 276 has an assert that says the option was not found. It should
be "not found or is of incorrect type.

HostTest::doExchange seems like a very useful method for purposes
other than just host testing. Can you move it to
dhcp6_test_utils.cc|h?

testOverrideRequestedOptions - good trick with SCOPED_TRACE. I know
this mechanism exists, but I always forget how the name of this macro.

Lines 723, 751, 771: Reuqest => Request

The code compiles and unit-tests pass on Ubuntu 15.10 x64.

The changelog looks ok. Once you address those minor comments mentioned
above, go ahead and merge. I don't need to see this ticket again.

comment:17 Changed 17 months ago by tomek

  • Add Hours to Ticket changed from 8 to 3
  • Total Hours changed from 8 to 11

comment:18 Changed 17 months ago by marcin

  • Add Hours to Ticket changed from 3 to 1
  • Resolution set to complete
  • Status changed from reviewing to closed
  • Total Hours changed from 11 to 12

I discussed the matter of moving doExchange method to utils and we concluded that we don't do it because that would impose circular dependency between the Dhcp6Client and the utility header. There is a way around it, by splitting !NakedDhcp6Srv and !Dhcpv6SrvTest class and putting them in separate header files, but it was too much of the burden for this particular ticket.

Merged with commit c29551e43010a345cfa2efda46389f4433d84650

Note: See TracTickets for help on using tickets.