[Dibbler-devel] Patch to Dibbler-Relay
MINODIER David RD-RESA-LAN
david.minodier at orange-ftgroup.com
Thu Apr 26 13:36:59 CEST 2007
Hi all,
Here is a patch for dibbler-relay.
Symptoms: dibbler-relay drops the RELAY-REPLY from the Dibbler-server
and displays the following message:
<warning: Invalid option 0 in RELAY_REPL message. Message Dropped>
Consequently, the client never gets any answer from the relay.
Cause:
When Dibbler-Relay processes the RELAY-REPLY from the Dibbler-Server, it
fails in parsing the two main dhcpv6 options that are:
OPTION_INTERFACE_ID and OPTION_RELAY_MSG.
In file RelIfaceMgr/RelIfaceMgr.cpp, function SmartPtr<TRelMsg>
TRelIfaceMgr::decodeRelayRepl (at line 140), once the
OPTION_INTERFACE_ID has been parsed, the pointer buf points to the value
of the option OPTION_INTERFACE_ID and not to the next option
(OPTION_RELAY_MSG). (btw, the OPTION_INTERFACE_ID is usually set to 1000
or 100 in the examples provided in the dibbler source distribution).
This results in letting dibbler-relay think there is another "main"
option (1000 or 100) in the DHCPv6 packet. Hence the code reaches the
default case, leading to a packet drop.
This little patch moves the buf pointer to the the first octet of the
second option.
David.
(stupid?) question: is it best to post a patch to the dibbler-devel
list, dibbler-user list or to bugzilla ?
Index: RelIfaceMgr/RelIfaceMgr.cpp
===================================================================
RCS file: /var/cvs/dibbler/RelIfaceMgr/RelIfaceMgr.cpp,v
retrieving revision 1.12
diff -u -r1.12 RelIfaceMgr.cpp
--- RelIfaceMgr/RelIfaceMgr.cpp 10 Mar 2007 01:42:32 -0000 1.12
+++ RelIfaceMgr/RelIfaceMgr.cpp 26 Apr 2007 09:59:09 -0000
@@ -180,6 +180,8 @@
return 0;
}
ptrIfaceID = new TRelOptInterfaceID(buf, bufsize, 0);
+ buf+=4;
+ bufsize-=4;
break;
case OPTION_RELAY_MSG:
relay = true;
More information about the Dibbler-devel
mailing list