From: John Hodge Date: Thu, 26 Dec 2013 13:39:37 +0000 (+0800) Subject: Usermode/dhcpc - Fixed comparison of net and local ordered values X-Git-Tag: rel0.15~31 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=cc98a8b6fb27ed2047a99e127ca4a1084f257dcb;p=tpg%2Facess2.git Usermode/dhcpc - Fixed comparison of net and local ordered values --- diff --git a/Usermode/Applications/dhcpclient_src/main.c b/Usermode/Applications/dhcpclient_src/main.c index afe7bf7e..d6f4cda0 100644 --- a/Usermode/Applications/dhcpclient_src/main.c +++ b/Usermode/Applications/dhcpclient_src/main.c @@ -333,7 +333,8 @@ void Send_DHCPREQUEST(tInterface *Iface, void *OfferPacket, int TypeOffset) int i; msg = (void*) ((char*)OfferPacket) + 8; - if( msg->xid != Iface->TransactionID ) { + if( msg->xid != htonl(Iface->TransactionID) ) { + _SysDebug("DHCPREQUEST: Transaction ID mismatch"); return ; } @@ -505,7 +506,9 @@ void Update_State(tInterface *Iface, int newState) // TODO: Exponential backoff Iface->Timeout = _SysTimestamp() + 3000; Iface->nTimeouts ++; - _SysDebug("State %i repeated, timeout is 3000ms now", newState); + _SysDebug("%s: State %i repeated, timeout is 3000ms now", + Iface->Adapter, + newState); } }