Module Name: src
Committed By: roy
Date: Wed Jun 26 17:47:47 UTC 2019
Modified Files:
src/external/bsd/dhcpcd/dist/hooks: 30-hostname
src/external/bsd/dhcpcd/dist/src: dhcp6.c dhcpcd.c if-bsd.c ipv6nd.c
Log Message:
Sync
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcpcd/dist/hooks/30-hostname
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/dhcpcd/dist/src/dhcp6.c \
src/external/bsd/dhcpcd/dist/src/if-bsd.c
cvs rdiff -u -r1.19 -r1.20 src/external/bsd/dhcpcd/dist/src/dhcpcd.c
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/dhcpcd/dist/src/ipv6nd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/dhcpcd/dist/hooks/30-hostname
diff -u src/external/bsd/dhcpcd/dist/hooks/30-hostname:1.2 src/external/bsd/dhcpcd/dist/hooks/30-hostname:1.3
--- src/external/bsd/dhcpcd/dist/hooks/30-hostname:1.2 Sat Sep 22 13:17:46 2018
+++ src/external/bsd/dhcpcd/dist/hooks/30-hostname Wed Jun 26 17:47:47 2019
@@ -80,7 +80,7 @@ need_hostname()
set_hostname_vars
if [ -n "$old_fqdn" ]; then
- if ${hfqdn} || ! ${hsort}; then
+ if ${hfqdn} || ! ${hshort}; then
[ "$hostname" = "$old_fqdn" ]
else
[ "$hostname" = "${old_fqdn%%.*}" ]
Index: src/external/bsd/dhcpcd/dist/src/dhcp6.c
diff -u src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.7 src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.8
--- src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.7 Sat May 4 09:42:15 2019
+++ src/external/bsd/dhcpcd/dist/src/dhcp6.c Wed Jun 26 17:47:47 2019
@@ -3783,6 +3783,8 @@ dhcp6_start(struct interface *ifp, enum
/* No DHCPv6 config, no existing state
* so nothing to do. */
return 0;
+ case DH6S_INFORM:
+ break;
default:
init_state = DH6S_INIT;
break;
@@ -3935,21 +3937,6 @@ dhcp6_free(struct interface *ifp)
}
void
-dhcp6_dropnondelegates(struct interface *ifp)
-{
-
-#ifndef SMALL
- if (dhcp6_hasprefixdelegation(ifp))
- return;
-#endif
- if (D6_CSTATE(ifp) == NULL)
- return;
-
- loginfox("%s: dropping DHCPv6 due to no valid routers", ifp->name);
- dhcp6_drop(ifp, "EXPIRE6");
-}
-
-void
dhcp6_abort(struct interface *ifp)
{
struct dhcp6_state *state;
Index: src/external/bsd/dhcpcd/dist/src/if-bsd.c
diff -u src/external/bsd/dhcpcd/dist/src/if-bsd.c:1.7 src/external/bsd/dhcpcd/dist/src/if-bsd.c:1.8
--- src/external/bsd/dhcpcd/dist/src/if-bsd.c:1.7 Sat May 4 09:42:15 2019
+++ src/external/bsd/dhcpcd/dist/src/if-bsd.c Wed Jun 26 17:47:47 2019
@@ -1063,7 +1063,7 @@ if_rtm(struct dhcpcd_ctx *ctx, const str
return 0;
if (if_copyrt(ctx, &rt, rtm) == -1)
- return -1;
+ return errno == ENOTSUP ? 0 : -1;
#ifdef INET6
/*
@@ -1305,7 +1305,8 @@ if_dispatch(struct dhcpcd_ctx *ctx, cons
return if_ifa(ctx, (const void *)rtm);
#ifdef RTM_DESYNC
case RTM_DESYNC:
- return dhcpcd_linkoverflow(ctx);
+ dhcpcd_linkoverflow(ctx);
+ return 0;
#endif
}
@@ -1325,7 +1326,9 @@ if_handlelink(struct dhcpcd_ctx *ctx)
return -1;
if (len == 0)
return 0;
- if (len < rtm.hdr.rtm_msglen) {
+ if ((size_t)len < offsetof(struct rt_msghdr, rtm_index) ||
+ len < rtm.hdr.rtm_msglen)
+ {
errno = EINVAL;
return -1;
}
Index: src/external/bsd/dhcpcd/dist/src/dhcpcd.c
diff -u src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.19 src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.20
--- src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.19 Sat May 4 09:42:15 2019
+++ src/external/bsd/dhcpcd/dist/src/dhcpcd.c Wed Jun 26 17:47:47 2019
@@ -1081,8 +1081,7 @@ dhcpcd_handlelink(void *arg)
dhcpcd_linkoverflow(ctx);
return;
}
- if (errno != ENOTSUP)
- logerr(__func__);
+ logerr(__func__);
}
}
Index: src/external/bsd/dhcpcd/dist/src/ipv6nd.c
diff -u src/external/bsd/dhcpcd/dist/src/ipv6nd.c:1.6 src/external/bsd/dhcpcd/dist/src/ipv6nd.c:1.7
--- src/external/bsd/dhcpcd/dist/src/ipv6nd.c:1.6 Fri Apr 26 14:34:10 2019
+++ src/external/bsd/dhcpcd/dist/src/ipv6nd.c Wed Jun 26 17:47:47 2019
@@ -382,9 +382,6 @@ ipv6nd_sendrsprobe(void *arg)
else {
logwarnx("%s: no IPv6 Routers available", ifp->name);
ipv6nd_drop(ifp);
-#ifdef DHCP6
- dhcp6_dropnondelegates(ifp);
-#endif
}
}
@@ -1525,9 +1522,6 @@ ipv6nd_expirera(void *arg)
struct timespec now, lt, expire, next;
bool expired, valid, validone;
struct ipv6_addr *ia;
-#ifdef DHCP6
- bool anyvalid = false;
-#endif
ifp = arg;
clock_gettime(CLOCK_MONOTONIC, &now);
@@ -1603,10 +1597,6 @@ ipv6nd_expirera(void *arg)
* as well punt it. */
if (!valid && !validone)
ipv6nd_free_ra(rap);
-#ifdef DHCP6
- else
- anyvalid = true;
-#endif
}
if (timespecisset(&next))
@@ -1616,12 +1606,6 @@ ipv6nd_expirera(void *arg)
rt_build(ifp->ctx, AF_INET6);
script_runreason(ifp, "ROUTERADVERT");
}
-
-#ifdef DHCP6
- /* No valid routers? Kill any DHCPv6. */
- if (!anyvalid)
- dhcp6_dropnondelegates(ifp);
-#endif
}
void