update to dhcpcd-7.2.0
This commit is contained in:
parent
b16b3b5aaa
commit
fac3112f84
@ -1,9 +1,8 @@
|
|||||||
# $OpenBSD: Makefile,v 1.50 2019/03/27 23:47:21 sthen Exp $
|
# $OpenBSD: Makefile,v 1.51 2019/04/23 10:52:59 sthen Exp $
|
||||||
|
|
||||||
COMMENT= DHCPv4/IPv4LL/IPv6RS/DHCPv6 quad stack client
|
COMMENT= DHCPv4/IPv4LL/IPv6RS/DHCPv6 quad stack client
|
||||||
|
|
||||||
DISTNAME= dhcpcd-7.1.1
|
DISTNAME= dhcpcd-7.2.0
|
||||||
REVISION= 4
|
|
||||||
|
|
||||||
CATEGORIES= net
|
CATEGORIES= net
|
||||||
EXTRACT_SUFX= .tar.xz
|
EXTRACT_SUFX= .tar.xz
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
SHA256 (dhcpcd-7.1.1.tar.xz) = onkkhz35LEeti3ak+6TftBr6o/kKS6Xw6OOtRG15JEE=
|
SHA256 (dhcpcd-7.2.0.tar.xz) = X/9VMxioastCLGPV2Loujtc/zX0dMsTl+2tVeXrsskI=
|
||||||
SIZE (dhcpcd-7.1.1.tar.xz) = 211788
|
SIZE (dhcpcd-7.2.0.tar.xz) = 212532
|
||||||
|
@ -1,65 +0,0 @@
|
|||||||
$OpenBSD: patch-src_dhcp6_c,v 1.3 2019/03/26 11:57:34 sthen Exp $
|
|
||||||
|
|
||||||
From 01c95afadf6231ae7dced05537f95995f086f573 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Roy Marples <roy@marples.name>
|
|
||||||
Date: Tue, 26 Mar 2019 00:40:57 +0000
|
|
||||||
Subject: DHCPv6: Allow nooptions dhcp6_unicast to work.
|
|
||||||
|
|
||||||
This allows dhcpcd to ignore any server set unicast option which
|
|
||||||
doesn't work.
|
|
||||||
|
|
||||||
Index: src/dhcp6.c
|
|
||||||
--- src/dhcp6.c.orig
|
|
||||||
+++ src/dhcp6.c
|
|
||||||
@@ -797,8 +797,7 @@ dhcp6_makemessage(struct interface *ifp)
|
|
||||||
m = state->new;
|
|
||||||
ml = state->new_len;
|
|
||||||
}
|
|
||||||
- unicast = NULL;
|
|
||||||
- /* Depending on state, get the unicast address */
|
|
||||||
+
|
|
||||||
switch(state->state) {
|
|
||||||
case DH6S_INIT: /* FALLTHROUGH */
|
|
||||||
case DH6S_DISCOVER:
|
|
||||||
@@ -806,7 +805,6 @@ dhcp6_makemessage(struct interface *ifp)
|
|
||||||
break;
|
|
||||||
case DH6S_REQUEST:
|
|
||||||
type = DHCP6_REQUEST;
|
|
||||||
- unicast = dhcp6_findmoption(m, ml, D6_OPTION_UNICAST, &uni_len);
|
|
||||||
break;
|
|
||||||
case DH6S_CONFIRM:
|
|
||||||
type = DHCP6_CONFIRM;
|
|
||||||
@@ -816,18 +814,31 @@ dhcp6_makemessage(struct interface *ifp)
|
|
||||||
break;
|
|
||||||
case DH6S_RENEW:
|
|
||||||
type = DHCP6_RENEW;
|
|
||||||
- unicast = dhcp6_findmoption(m, ml, D6_OPTION_UNICAST, &uni_len);
|
|
||||||
break;
|
|
||||||
case DH6S_INFORM:
|
|
||||||
type = DHCP6_INFORMATION_REQ;
|
|
||||||
break;
|
|
||||||
case DH6S_RELEASE:
|
|
||||||
type = DHCP6_RELEASE;
|
|
||||||
- unicast = dhcp6_findmoption(m, ml, D6_OPTION_UNICAST, &uni_len);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
errno = EINVAL;
|
|
||||||
return -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ switch(state->state) {
|
|
||||||
+ case DH6S_REQUEST: /* FALLTHROUGH */
|
|
||||||
+ case DH6S_RENEW: /* FALLTHROUGH */
|
|
||||||
+ case DH6S_RELEASE:
|
|
||||||
+ if (has_option_mask(ifo->nomask6, D6_OPTION_UNICAST)) {
|
|
||||||
+ unicast = NULL;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ unicast = dhcp6_findmoption(m, ml, D6_OPTION_UNICAST, &uni_len);
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ unicast = NULL;
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* In non master mode we listen and send from fixed addresses.
|
|
@ -1,43 +0,0 @@
|
|||||||
$OpenBSD: patch-src_if-options_c,v 1.2 2019/03/27 23:47:21 sthen Exp $
|
|
||||||
|
|
||||||
From f17480d3e1e914d03fea0c054a028fe979742950 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Roy Marples <roy@marples.name>
|
|
||||||
Date: Mon, 25 Mar 2019 12:17:07 +0000
|
|
||||||
Subject: script: Fix not running when empty string or /dev/null
|
|
||||||
|
|
||||||
From 7a7ab5ba647e229a99ba154950a5eae1a5b63ccd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Roy Marples <roy@marples.name>
|
|
||||||
Date: Wed, 27 Mar 2019 17:33:03 +0000
|
|
||||||
Subject: script: Parse argument as a string
|
|
||||||
|
|
||||||
This allows "" to equal /dev/null.
|
|
||||||
|
|
||||||
Index: src/if-options.c
|
|
||||||
--- src/if-options.c.orig
|
|
||||||
+++ src/if-options.c
|
|
||||||
@@ -709,9 +709,23 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifnam
|
|
||||||
case 'c':
|
|
||||||
ARG_REQUIRED;
|
|
||||||
free(ifo->script);
|
|
||||||
- ifo->script = strdup(arg);
|
|
||||||
- if (ifo->script == NULL)
|
|
||||||
+ s = parse_string(NULL, 0, arg);
|
|
||||||
+ if (s == 0) {
|
|
||||||
+ ifo->script = NULL;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ dl = (size_t)s;
|
|
||||||
+ if (s == -1 || (ifo->script = malloc(dl)) == NULL) {
|
|
||||||
logerr(__func__);
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ parse_string(ifo->script, dl, arg);
|
|
||||||
+ if (ifo->script[0] == '\0' ||
|
|
||||||
+ strcmp(ifo->script, "/dev/null") == 0)
|
|
||||||
+ {
|
|
||||||
+ free(ifo->script);
|
|
||||||
+ ifo->script = NULL;
|
|
||||||
+ }
|
|
||||||
break;
|
|
||||||
case 'd':
|
|
||||||
ifo->options |= DHCPCD_DEBUG;
|
|
@ -1,37 +0,0 @@
|
|||||||
$OpenBSD: patch-src_script_c,v 1.2 2019/03/27 23:47:21 sthen Exp $
|
|
||||||
|
|
||||||
From f17480d3e1e914d03fea0c054a028fe979742950 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Roy Marples <roy@marples.name>
|
|
||||||
Date: Mon, 25 Mar 2019 12:17:07 +0000
|
|
||||||
Subject: script: Fix not running when empty string or /dev/null
|
|
||||||
|
|
||||||
From 97bb60296dc42a29a054ebf9347ac31a7d787393 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Roy Marples <roy@marples.name>
|
|
||||||
Date: Mon, 25 Mar 2019 12:20:45 +0000
|
|
||||||
Subject: script: Fix prior when we have listeners but no script
|
|
||||||
|
|
||||||
Index: src/script.c
|
|
||||||
--- src/script.c.orig
|
|
||||||
+++ src/script.c
|
|
||||||
@@ -704,9 +704,7 @@ script_runreason(const struct interface *ifp, const ch
|
|
||||||
int status = 0;
|
|
||||||
struct fd_list *fd;
|
|
||||||
|
|
||||||
- if (ifp->options->script &&
|
|
||||||
- (ifp->options->script[0] == '\0' ||
|
|
||||||
- strcmp(ifp->options->script, "/dev/null") == 0) &&
|
|
||||||
+ if (ifp->options->script == NULL &&
|
|
||||||
TAILQ_FIRST(&ifp->ctx->control_fds) == NULL)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
@@ -717,9 +715,7 @@ script_runreason(const struct interface *ifp, const ch
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (ifp->options->script &&
|
|
||||||
- (ifp->options->script[0] == '\0' ||
|
|
||||||
- strcmp(ifp->options->script, "/dev/null") == 0))
|
|
||||||
+ if (ifp->options->script == NULL)
|
|
||||||
goto send_listeners;
|
|
||||||
|
|
||||||
argv[0] = ifp->options->script ? ifp->options->script : UNCONST(SCRIPT);
|
|
Loading…
Reference in New Issue
Block a user