From cc98a8b6fb27ed2047a99e127ca4a1084f257dcb Mon Sep 17 00:00:00 2001 From: John Hodge Date: Thu, 26 Dec 2013 21:39:37 +0800 Subject: [PATCH] Usermode/dhcpc - Fixed comparison of net and local ordered values --- Usermode/Applications/dhcpclient_src/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); } } -- 2.20.1