BIND 10 #2940: DHCPv4 server crashes when using Memfile backend and running perfdhcp
BIND 10 Development
do-not-reply at isc.org
Fri Nov 15 13:50:20 UTC 2013
#2940: DHCPv4 server crashes when using Memfile backend and running perfdhcp
-------------------------------------+-------------------------------------
Reporter: marcin | Owner: tomek
Type: defect | Status:
Priority: medium | reviewing
Component: dhcp4 | Milestone:
Keywords: | Sprint-DHCP-20131016
Sensitive: 0 | Resolution:
Sub-Project: DHCP | CVSS Scoring:
Estimated Difficulty: 0 | Defect Severity:
Total Hours: 0 | Medium
| Feature Depending on Ticket:
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Changes (by marcin):
* owner: marcin => tomek
Comment:
Replying to [comment:7 tomek]:
> '''lease.cc'''
> getClientIdVector() returns a copy. This has a potential of making a
copy of every client-id in the db when we use specific search index.
Please consider returning a reference.
>
I now return a reference. That change required changes to the
ClientId::getClientId function to return a const reference too. Otherwise,
by using the local copy of the client id returned by the
ClientId::getClientId() I would cause a segfault.
> '''memfile_lease_mgr.cc'''
> Lines 83 and 127: please add a space after 'if'.
>
Added.
> Would it be possible to modify mutlti-index container to do the same
with DUIDs as it does with clientIds now? That would eliminate the need to
use KeyFromKeyExtractor. This is an honest question. No is a perfectly
good answer here :)
I was going to say No. But on reflection I decided to do it because it
simplifies the definition of the multi index container a lot.
>
> Please move content of MemfileLeaseMgrTest.{getLease4ClientId,
getLease4NullClientId, getLease4ClientIdHWAddrSubnetId} to
GenericLeaseMgrTest. Those tests should be perfectly valid for reuse for
MySQL (and upcoming PostgreSQL, too).
>
> I do not have any specific preference how this move is being conducted,
but it is very important to share those tests among all backends. It will
be even more important with every backend we add.
I moved them, but the MySQL backend still has private unit tests. We will
have to unify these tests at some point.
--
Ticket URL: <http://bind10.isc.org/ticket/2940#comment:8>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list