This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

DHCP sec field


I found a DHCP server that ignores DHCP discover
messages if the sec field is 0.  Attached patch
updates the secs field on the DHCP discover message.

-- Matt

__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
? dhcp.pat
Index: current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/ChangeLog,v
retrieving revision 1.54
diff -u -r1.54 ChangeLog
--- current/ChangeLog	10 Dec 2003 12:09:24 -0000	1.54
+++ current/ChangeLog	17 Feb 2004 18:07:51 -0000
@@ -1,3 +1,7 @@
+2004-02-17	Matt Jerdonek <maj1224@yahoo.com>
+
+	* src/dhcp_prot.c: Fix initialization of DHCP sec field
+
 2003-12-10  Gary Thomas  <gary@mlbassoc.com>
 
 	* src/inet_ntoa.c: Add thread safe inet_ntoa_r() and change
Index: current/src/dhcp_prot.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/src/dhcp_prot.c,v
retrieving revision 1.13
diff -u -r1.13 dhcp_prot.c
--- current/src/dhcp_prot.c	21 Oct 2003 17:50:58 -0000	1.13
+++ current/src/dhcp_prot.c	17 Feb 2004 18:07:53 -0000
@@ -743,7 +743,7 @@
             xmit->bp_htype = HTYPE_ETHERNET;
             xmit->bp_hlen = IFHWADDRLEN;
             xmit->bp_xid = xid;
-            xmit->bp_secs = 0;
+            xmit->bp_secs = cyg_current_time() / 100;
             xmit->bp_flags = htons(0x8000); // BROADCAST FLAG
             bcopy(ifr.ifr_hwaddr.sa_data, &xmit->bp_chaddr, xmit->bp_hlen);
             bcopy(mincookie, xmit->bp_vend, sizeof(mincookie));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]