[Dibbler] Patch for DP when Forwarding is on.
MINODIER David RD-RESA-LAN
david.minodier at orange-ftgroup.com
Mon Mar 26 14:55:28 CEST 2007
Hi again,
regarding Prefix delegation, it seems that there is a little bug in:
ClntIfaceMgr/ClntIfaceMgr.cpp, in function :
bool TClntIfaceMgr::modifyPrefix(int iface, SPtr<TIPv6Addr> prefix, int
prefixLen, unsigned int pref, unsigned int valid, PrefixModifyMode
mode) line 393.
This function is more or less divided into two parts:
- 1) prefix_forwarding is NOT enabled,
this section if fine.
- 2) prefix forwarding IS enabled: (starts at line 444):
here, prefix operation will apply to ALL interfaces.
Hence, lines 503-519:
switch (mode) {
case PREFIX_MODIFY_ADD:
status = prefix_add(ptrIface->getName(), iface,
tmpAddr->getPlain(), prefixLen+8, pref, valid);
break;
case PREFIX_MODIFY_UPDATE:
status = prefix_update(ptrIface->getName(), iface,
tmpAddr->getPlain(), prefixLen+8, pref, valid);
break;
case PREFIX_MODIFY_DEL:
status = prefix_del(ptrIface->getName(), iface,
tmpAddr->getPlain(), prefixLen+8);
break;
}
if (status!=LOWLEVEL_NO_ERROR) {
string tmp = error_message();
Log(Error) << "Prefix error encountered during " << action << "
operation: " << tmp << LogEnd;
return false;
should be replaced with:
switch (mode) {
case PREFIX_MODIFY_ADD:
status = prefix_add(x->getName(), x->getID(), prefix->getPlain(),
prefixLen, pref, valid);
break;
case PREFIX_MODIFY_UPDATE:
status = prefix_update(x->getName(), x->getID(),
prefix->getPlain(), prefixLen, pref, valid);
break;
case PREFIX_MODIFY_DEL:
status = prefix_del(x->getName(), x->getID(), prefix->getPlain(),
prefixLen);
break;
}
if (status!=LOWLEVEL_NO_ERROR) {
string tmp = error_message();
Log(Error) << "Prefix error encountered during " << action << "
operation: " << tmp << LogEnd;
return false;
}
}
return true;
since we wanna apply PD to every interfaces pointed by x within the
while loop, and not to the "main" interface ptrIface.
Here's the patch.
David.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_PD_when_forwarding_is_on.diff
Type: application/octet-stream
Size: 1602 bytes
Desc: patch_PD_when_forwarding_is_on.diff
Url : http://klub.com.pl/pipermail/dibbler/attachments/20070326/486defad/attachment.obj
More information about the Dibbler
mailing list