BIND 10 master, updated. 894e0ca1da8ca1a1f572a0e0d0a4f91102827d67 [master] Merge branch 'trac2719' (bug for handling unexpected RENEWs in DHCPv6)
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Feb 12 16:25:49 UTC 2013
The branch, master has been updated
via 894e0ca1da8ca1a1f572a0e0d0a4f91102827d67 (commit)
via 3132b8b19495470bbfd0f2ba0fe7da443926034b (commit)
via b57fc0894581ef07334a8f6c5bd0a6129d5289a1 (commit)
from 4982a87469884b80b077ec4ad9dc5445aeea6dc3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 894e0ca1da8ca1a1f572a0e0d0a4f91102827d67
Merge: 4982a87 3132b8b
Author: Tomek Mrugalski <tomasz at isc.org>
Date: Tue Feb 12 17:25:42 2013 +0100
[master] Merge branch 'trac2719' (bug for handling unexpected RENEWs in DHCPv6)
Conflicts:
ChangeLog
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
src/bin/dhcp6/dhcp6_messages.mes | 10 ++++++++++
src/bin/dhcp6/dhcp6_srv.cc | 25 +++++++++++++++++++------
3 files changed, 34 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
diff --git a/ChangeLog b/ChangeLog
index 31c3c1f..f57ae6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+576. [bug] tmark, tomek
+ b10-dhcp6: Fixed bug when the server aborts operation when
+ receiving renew and there are no IPv6 subnets configured.
+ (Trac 2719, git 3132b8b19495470bbfd0f2ba0fe7da443926034b)
+
575. [bug] marcin
b10-dhcp6: Fixed the bug whereby the subnet for the incoming
packet was selected using only its source address. The subnet
diff --git a/src/bin/dhcp6/dhcp6_messages.mes b/src/bin/dhcp6/dhcp6_messages.mes
index 12ce5e6..72dff4c 100644
--- a/src/bin/dhcp6/dhcp6_messages.mes
+++ b/src/bin/dhcp6/dhcp6_messages.mes
@@ -210,6 +210,16 @@ as a hint for possible requested address.
% DHCP6_QUERY_DATA received packet length %1, data length %2, data is %3
A debug message listing the data received from the client or relay.
+% DHCP6_RENEW_UNKNOWN_SUBNET RENEW message received from client on unknown subnet (duid=%1, iaid=%2)
+A warning message indicating that a client is attempting to renew his lease,
+but the server does not have any information about the subnet this client belongs
+to. This may mean that faulty the mobile client changed its location and is trying to
+renew its old address (client is supposed to send confirm, not rewew in such cases,
+according to RFC3315) or the server configuration has changed and information about
+existing subnet was removed. Note that in a sense this is worse case of DHCP6_UNKNOWN_RENEW,
+as not only the lease is unknown, but also the subnet is. Depending on the reasons
+of this condition, it may or may not correct on its own.
+
% DHCP6_REQUIRED_OPTIONS_CHECK_FAIL %1 message received from %2 failed the following check: %3
This message indicates that received DHCPv6 packet is invalid. This may be due
to a number of reasons, e.g. the mandatory client-id option is missing,
diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc
index 4e11cdc..5f1580f 100644
--- a/src/bin/dhcp6/dhcp6_srv.cc
+++ b/src/bin/dhcp6/dhcp6_srv.cc
@@ -556,9 +556,7 @@ Dhcpv6Srv::assignLeases(const Pkt6Ptr& question, Pkt6Ptr& answer) {
// thing this client can get is some global information (like DNS
// servers).
- // perhaps this should be logged on some higher level? This is most likely
- // configuration bug.
- LOG_ERROR(dhcp6_logger, DHCP6_SUBNET_SELECTION_FAILED)
+ LOG_WARN(dhcp6_logger, DHCP6_SUBNET_SELECTION_FAILED)
.arg(question->getRemoteAddr().toText())
.arg(question->getName());
@@ -706,6 +704,21 @@ Dhcpv6Srv::assignIA_NA(const Subnet6Ptr& subnet, const DuidPtr& duid,
OptionPtr
Dhcpv6Srv::renewIA_NA(const Subnet6Ptr& subnet, const DuidPtr& duid,
Pkt6Ptr /* question */, boost::shared_ptr<Option6IA> ia) {
+ if (!subnet) {
+ // There's no subnet select for this client. There's nothing to renew.
+ boost::shared_ptr<Option6IA> ia_rsp(new Option6IA(D6O_IA_NA, ia->getIAID()));
+
+ // Insert status code NoAddrsAvail.
+ ia_rsp->addOption(createStatusCode(STATUS_NoBinding,
+ "Sorry, no known leases for this duid/iaid."));
+
+ LOG_DEBUG(dhcp6_logger, DBG_DHCP6_DETAIL, DHCP6_RENEW_UNKNOWN_SUBNET)
+ .arg(duid->toText())
+ .arg(ia->getIAID());
+
+ return (ia_rsp);
+ }
+
Lease6Ptr lease = LeaseMgrFactory::instance().getLease6(*duid, ia->getIAID(),
subnet->getID());
@@ -767,9 +780,9 @@ Dhcpv6Srv::renewLeases(const Pkt6Ptr& renew, Pkt6Ptr& reply) {
// thing this client can get is some global information (like DNS
// servers).
- // perhaps this should be logged on some higher level? This is most likely
- // configuration bug.
- LOG_ERROR(dhcp6_logger, DHCP6_SUBNET_SELECTION_FAILED);
+ LOG_WARN(dhcp6_logger, DHCP6_SUBNET_SELECTION_FAILED)
+ .arg(renew->getRemoteAddr().toText())
+ .arg(renew->getName());
} else {
LOG_DEBUG(dhcp6_logger, DBG_DHCP6_DETAIL_DATA, DHCP6_SUBNET_SELECTED)
.arg(subnet->toText());
More information about the bind10-changes
mailing list