Skip to contentSkip to conversation

#97: OpenVPN produces DCHP NAK bomb on Win 7 64bit

Openvpn-devel Gert Doering 1 participant 1 message Jul 13, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

forwarding something from a Trac ticket so "someone with time at his hands" (and understanding of the code) could look into this...

gert

----- Forwarded message from OpenVPN Trac instance <[email protected]...> -----

#97: OpenVPN produces DCHP NAK bomb on Win 7 64bit
--------------------------------------------------+-------------------------

 Reporter:  janjust                               |        Owner:               
     Type:  Bug / Defect                          |       Status:  closed       
 Priority:  major                                 |    Milestone:  release 2.2.2
Component:  Networking                            |      Version:  2.1.4        
 Severity:  Not set (if unsure, select this one)  |   Resolution:  fixed        
 Keywords:  win7 tap-win32 dhcpnak                |  

--------------------------------------------------+-------------------------

Comment(by ert):

Seems to be a bug in the TAP driver. It's happening after you try to refresh the DHCP lease 3 times (after resume from hibernation, Windows tries to acquire a DHCP lease too).
I think the reason for this is a programming error in dhcp.c in function ProcessDHCP:

// Is this a bad DHCPREQUEST?
if (msg_type == DHCPREQUEST && dhcp->ciaddr != p_Adapter->m_dhcp_addr)

     ++p_Adapter->m_dhcp_bad_requests;

should be:

if (dhcp->ciaddr && msg_type == DHCPREQUEST && dhcp->ciaddr !=
p_Adapter->m_dhcp_addr)

     ++p_Adapter->m_dhcp_bad_requests;

as the win32 DHCP client always requests with all fields set to 0, so this increases the error counter even though it isn't a bad request and as BAD_DHCPREQUEST_NAK_THRESHOLD is 3, it fails after the third renew attempt.
Could someone please fix this in the TAP driver and provide a signed copy? We need the driver for production use...

Regards.

Signature · 12 lines
Ticket URL: <https://community.openvpn.net/openvpn/ticket/97#comment:8>
OpenVPN Community <http://openvpn.net>
OpenVPN is a layer 2/3 SSL VPN


----- End forwarded message -----

-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...