diff options
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch')
-rw-r--r-- | meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch b/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch new file mode 100644 index 000000000..42d2627a1 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch @@ -0,0 +1,48 @@ +Index: git/ClntMessages/ClntMsgRequest.cpp +=================================================================== +--- git.orig/ClntMessages/ClntMsgRequest.cpp ++++ git/ClntMessages/ClntMsgRequest.cpp +@@ -142,7 +142,10 @@ TClntMsgRequest::TClntMsgRequest(List(TA + IsDone=false; + SPtr<TOpt> ptr; + ptr = new TOptDUID(OPTION_CLIENTID, ClntCfgMgr().getDUID(), this ); +- Options.push_back( ptr ); ++ ++ if ( ptr ) { ++ Options.push_back( ptr ); ++ } + + if (!srvDUID) { + Log(Error) << "Unable to send REQUEST: ServerId not specified.\n" << LogEnd; +@@ -153,7 +156,9 @@ TClntMsgRequest::TClntMsgRequest(List(TA + ptr = new TOptDUID(OPTION_SERVERID, srvDUID,this); + // all IAs provided by checkSolicit + SPtr<TAddrIA> ClntAddrIA; +- Options.push_back( ptr ); ++ if ( ptr ) { ++ Options.push_back( ptr ); ++ } + + IAs.first(); + while (ClntAddrIA = IAs.get()) +Index: git/Messages/Msg.cpp +=================================================================== +--- git.orig/Messages/Msg.cpp ++++ git/Messages/Msg.cpp +@@ -69,10 +69,15 @@ int TMsg::getSize() + { + int pktsize=0; + TOptList::iterator opt; ++ int optionCount = 0; + for (opt = Options.begin(); opt!=Options.end(); ++opt) + { +- pktsize += (*opt)->getSize(); ++ Log(Info) << "### CPE Debug - Option with index " << optionCount++ << LogEnd ; ++ Log(Info) << "### CPE Debug - Option with type " << (*opt)->getOptType() << LogEnd ; ++ pktsize += (*opt)->getSize(); + } ++ Log(Info) << "### CPE Debug - Packet size of option (Add 4) " << pktsize << LogEnd ; ++ + return pktsize + 4; + } + |