1Index: git/ClntMessages/ClntMsgRequest.cpp 2=================================================================== 3--- git.orig/ClntMessages/ClntMsgRequest.cpp 4+++ git/ClntMessages/ClntMsgRequest.cpp 5@@ -142,7 +142,10 @@ TClntMsgRequest::TClntMsgRequest(List(TA 6 IsDone=false; 7 SPtr<TOpt> ptr; 8 ptr = new TOptDUID(OPTION_CLIENTID, ClntCfgMgr().getDUID(), this ); 9- Options.push_back( ptr ); 10+ 11+ if ( ptr ) { 12+ Options.push_back( ptr ); 13+ } 14 15 if (!srvDUID) { 16 Log(Error) << "Unable to send REQUEST: ServerId not specified.\n" << LogEnd; 17@@ -153,7 +156,9 @@ TClntMsgRequest::TClntMsgRequest(List(TA 18 ptr = new TOptDUID(OPTION_SERVERID, srvDUID,this); 19 // all IAs provided by checkSolicit 20 SPtr<TAddrIA> ClntAddrIA; 21- Options.push_back( ptr ); 22+ if ( ptr ) { 23+ Options.push_back( ptr ); 24+ } 25 26 IAs.first(); 27 while (ClntAddrIA = IAs.get()) 28Index: git/Messages/Msg.cpp 29=================================================================== 30--- git.orig/Messages/Msg.cpp 31+++ git/Messages/Msg.cpp 32@@ -69,10 +69,15 @@ int TMsg::getSize() 33 { 34 int pktsize=0; 35 TOptList::iterator opt; 36+ int optionCount = 0; 37 for (opt = Options.begin(); opt!=Options.end(); ++opt) 38 { 39- pktsize += (*opt)->getSize(); 40+ Log(Info) << "### CPE Debug - Option with index " << optionCount++ << LogEnd ; 41+ Log(Info) << "### CPE Debug - Option with type " << (*opt)->getOptType() << LogEnd ; 42+ pktsize += (*opt)->getSize(); 43 } 44+ Log(Info) << "### CPE Debug - Packet size of option (Add 4) " << pktsize << LogEnd ; 45+ 46 return pktsize + 4; 47 } 48 49