summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2017-02-09 16:26:40 -0800
committerMichael Forney <mforney@mforney.org>2017-02-09 16:26:40 -0800
commit0ee1afe6324eadfa2b93229fea985034b147c0cc (patch)
tree8400db5b9db8c408c90e87738417d8a5b4b15f9e
parentc7a0f39769888815873bf9fa52c0c092ec6fefc4 (diff)
sdhcp: Remove patch applied upstream
-rw-r--r--pkg/sdhcp/patch/0002-Fix-sent-lease-time-on-64-bit-systems.patch59
-rw-r--r--pkg/sdhcp/rev2
m---------pkg/sdhcp/src0
3 files changed, 1 insertions, 60 deletions
diff --git a/pkg/sdhcp/patch/0002-Fix-sent-lease-time-on-64-bit-systems.patch b/pkg/sdhcp/patch/0002-Fix-sent-lease-time-on-64-bit-systems.patch
deleted file mode 100644
index f28f54f5..00000000
--- a/pkg/sdhcp/patch/0002-Fix-sent-lease-time-on-64-bit-systems.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 3e4ba21a6b51000c0d535a9a86a6bb6f9eb34496 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Tue, 7 Feb 2017 17:16:21 -0800
-Subject: [PATCH] Fix sent lease time on 64-bit systems
-
-The lease time option is defined in RFC 1533 to be a 32-bit unsigned
-integer. However, on 64-bit systems, unsigned long long is 64 bits, so
-hnput writes 8 bytes, the first 4 of which are 0.
-
-dnsmasq (and possibly other DHCP servers) only looks at the first 4
-bytes in the option, so interprets a lease time of 0. It then sets the
-lease time to a minimum of 120 seconds. This causes the server to expire
-the lease long before sdhcp attempts to renew it.
----
- sdhcp.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/sdhcp.c b/sdhcp.c
-index c5f986a..7b8c687 100644
---- a/sdhcp.c
-+++ b/sdhcp.c
-@@ -9,6 +9,7 @@
- #include <fcntl.h>
- #include <poll.h>
- #include <signal.h>
-+#include <stdint.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-@@ -95,7 +96,7 @@ static unsigned char client[4];
- static unsigned char mask[4];
- static unsigned char router[4];
- static unsigned char dns[4];
--static unsigned long t1;
-+static uint32_t t1;
-
- static int dflag = 1; /* change DNS in /etc/resolv.conf ? */
- static int iflag = 1; /* set IP ? */
-@@ -104,7 +105,7 @@ static int fflag = 0; /* run in foreground */
- #define IP(a,b,c,d) (unsigned char[4]){a,b,c,d}
-
- static void
--hnput(unsigned char *dst, unsigned long long src, size_t n)
-+hnput(unsigned char *dst, uint32_t src, size_t n)
- {
- unsigned int i;
-
-@@ -249,7 +250,7 @@ optput(unsigned char *p, int opt, unsigned char *data, size_t len)
- }
-
- static unsigned char *
--hnoptput(unsigned char *p, int opt, long long data, size_t len)
-+hnoptput(unsigned char *p, int opt, uint32_t data, size_t len)
- {
- *p++ = opt;
- *p++ = (unsigned char)len;
---
-2.11.1
-
diff --git a/pkg/sdhcp/rev b/pkg/sdhcp/rev
index 00750edc..b8626c4c 100644
--- a/pkg/sdhcp/rev
+++ b/pkg/sdhcp/rev
@@ -1 +1 @@
-3
+4
diff --git a/pkg/sdhcp/src b/pkg/sdhcp/src
-Subproject 450beea4e88ab7f80206741f18f0d5539ae60b4
+Subproject 90b18e7b1cfcf7ab0799b917d7c4d1318ed29f5