@@ -4503,19 +4503,36 @@ Dhcpv6Srv::processAddrRegInform(AllocEngine::ClientContext6& ctx) {
4503
4503
4504
4504
// Check if the message is bad and shout be dropped.
4505
4505
try {
4506
- // Get IA_NA from the Address registration inform.
4506
+ // Check there is no IA_NA option.
4507
+ if (addr_reg_inf->getOption (D6O_IA_NA)) {
4508
+ isc_throw (RFCViolation, " unexpected IA_NA option" );
4509
+ }
4510
+
4511
+ // Check there is no IA_TA option.
4512
+ if (addr_reg_inf->getOption (D6O_IA_TA)) {
4513
+ isc_throw (RFCViolation, " unexpected IA_TA option" );
4514
+ }
4515
+
4516
+ // Check there is no IA_PD option.
4517
+ if (addr_reg_inf->getOption (D6O_IA_PD)) {
4518
+ isc_throw (RFCViolation, " unexpected IA_PD option" );
4519
+ }
4520
+
4521
+ // Get IAADDR from the Address registration inform.
4507
4522
// There must be one.
4508
4523
OptionCollection addrs = addr_reg_inf->getOptions (D6O_IAADDR);
4509
4524
if (addrs.size () != 1 ) {
4510
- isc_throw (RFCViolation, " Exactly 1 IAADDRESS option expected, but "
4525
+ isc_throw (RFCViolation, " Exactly 1 IAADDR option expected, but "
4511
4526
<< addrs.size () << " received" );
4512
4527
}
4513
4528
iaaddr = boost::dynamic_pointer_cast<Option6IAAddr>(addrs.begin ()->second );
4514
4529
if (!iaaddr) {
4515
- isc_throw (Unexpected, " can't convert the IAAddress option" );
4530
+ isc_throw (Unexpected, " can't convert the IAADDR option" );
4516
4531
}
4517
4532
4518
4533
// Set per-IA context values.
4534
+ // Note the address is considered as not-temporary address.
4535
+
4519
4536
ctx.createIAContext ();
4520
4537
ctx.currentIA ().type_ = Lease::TYPE_NA;
4521
4538
ctx.currentIA ().iaid_ = no_iaid;
0 commit comments