summaryrefslogtreecommitdiffstats
path: root/net-mgmt/wide-dhcp/files/patch-as
diff options
context:
space:
mode:
Diffstat (limited to 'net-mgmt/wide-dhcp/files/patch-as')
-rw-r--r--net-mgmt/wide-dhcp/files/patch-as75
1 files changed, 24 insertions, 51 deletions
diff --git a/net-mgmt/wide-dhcp/files/patch-as b/net-mgmt/wide-dhcp/files/patch-as
index 7b466bb6..c7263ff 100644
--- a/net-mgmt/wide-dhcp/files/patch-as
+++ b/net-mgmt/wide-dhcp/files/patch-as
@@ -1,29 +1,16 @@
---- client/dhcpc.c.orig Mon Jul 7 17:08:35 1997
-+++ client/dhcpc.c Wed Apr 22 01:34:39 1998
-@@ -53,6 +53,12 @@
- #ifndef sun
- #include <net/bpf.h>
- #endif
-+#ifdef __FreeBSD__
-+#include <osreldate.h>
-+#if (__FreeBSD_version == 199702) || (__FreeBSD_version >= 300000)
-+#include <net/if_var.h>
-+#endif
-+#endif
- #include <netinet/in.h>
- #include <netinet/in_systm.h>
- #include <netinet/if_ether.h>
-@@ -82,6 +88,7 @@
+--- client/dhcpc.c.orig Fri Jan 1 05:20:08 1999
++++ client/dhcpc.c Sun Feb 7 11:17:59 1999
+@@ -88,6 +88,7 @@
struct dhcp_reqspec reqspec;
struct if_info intface;
struct dhcp_param *param_list;
+int f_resolv, f_hostname;
char pid_filename[MAXPATHLEN];
+ char cache_filename[MAXPATHLEN];
- int (*fsm[MAX_STATES])();
-@@ -227,6 +234,14 @@
- (void) sndcamt();
- #endif
+@@ -256,6 +257,14 @@
+ if (config_if(&intface, &addr, &mask, &brdaddr) == 0) {
+ set_route(paramp);
}
+#ifdef __FreeBSD__
+ if (f_resolv) {
@@ -36,39 +23,25 @@
#endif
return;
-@@ -264,15 +279,8 @@
+@@ -293,7 +302,7 @@
/*
* split conditions into pieces for debugging
*/
-#ifndef sun
-- if (ntohs(rcv.ip->ip_len) < MINDHCPLEN + UDPHL + IPHL)
-- return(0);
-- if (ntohs(rcv.udp->uh_ulen) < MINDHCPLEN + UDPHL)
-- return(0);
--#else
- if (rcv.udp->uh_dport != dhcpc_port)
++#if !defined(sun) && !defined(__FreeBSD__)
+ if (ntohs(rcv.ip->ip_len) < MINDHCPLEN + UDPHL + IPHL)
return(0);
--#endif
- if (ripcksum != cksum((u_short *) rcv.ip, rcv.ip->ip_hl * 2))
- return(0);
- if (rcv.udp->uh_sum != 0 &&
-@@ -321,15 +329,8 @@
+ if (ntohs(rcv.udp->uh_ulen) < MINDHCPLEN + UDPHL)
+@@ -350,7 +359,7 @@
/*
* split conditions into pieces for debugging
*/
-#ifndef sun
-- if (ntohs(rcv.ip->ip_len) < MINDHCPLEN + UDPHL + IPHL)
-- return(0);
-- if (ntohs(rcv.udp->uh_ulen) < MINDHCPLEN + UDPHL)
-- return(0);
--#else
- if (rcv.udp->uh_dport != dhcpc_port)
- return(0);
--#endif
- if (ripcksum != cksum((u_short *) rcv.ip, rcv.ip->ip_hl * 2))
++#if !defined(sun) && !defined(__FreeBSD__)
+ if (ntohs(rcv.ip->ip_len) < MINDHCPLEN + UDPHL + IPHL)
return(0);
- if (rcv.udp->uh_sum != 0 &&
-@@ -1761,7 +1762,11 @@
+ if (ntohs(rcv.udp->uh_ulen) < MINDHCPLEN + UDPHL)
+@@ -1789,7 +1798,11 @@
void
usage()
{
@@ -81,7 +54,7 @@
exit(1);
}
-@@ -1781,26 +1786,38 @@
+@@ -1809,26 +1822,39 @@
{
int debug = 0;
int n = 0;
@@ -90,11 +63,6 @@
bzero(&reqspec, sizeof(reqspec));
bzero(&ifinfo, sizeof(ifinfo));
-+#ifdef __FreeBSD__
-+#define COM_OPTS "vdrn"
-+#else
-+#define COM_OPTS "vd"
-+#endif
- while (*++argv && argv[0][0] == '-') {
- switch (argv[0][1]) {
@@ -110,7 +78,12 @@
- }
- }
- if (argv[0] == NULL) usage();
--
++#ifdef __FreeBSD__
++#define COM_OPTS "vdrn"
++#else
++#define COM_OPTS "vd"
++#endif
+
+ while ((count = getopt(argc, argv, COM_OPTS)) != EOF) {
+ switch (count) {
+ case 'v':
@@ -135,7 +108,7 @@
strcpy(ifinfo.name, argv[0]);
/*
-@@ -1831,6 +1848,11 @@
+@@ -1859,6 +1885,11 @@
reqspec.reqlist.list[reqspec.reqlist.len++] = SUBNET_MASK;
reqspec.reqlist.list[reqspec.reqlist.len++] = ROUTER;
reqspec.reqlist.list[reqspec.reqlist.len++] = BRDCAST_ADDR;
OpenPOWER on IntegriCloud