Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/dhcpcd/dist Sync



details:   https://anonhg.NetBSD.org/src/rev/bec24072bca9
branches:  trunk
changeset: 842346:bec24072bca9
user:      roy <roy%NetBSD.org@localhost>
date:      Wed Jun 26 17:47:47 2019 +0000

description:
Sync

diffstat:

 external/bsd/dhcpcd/dist/hooks/30-hostname |   2 +-
 external/bsd/dhcpcd/dist/src/dhcp6.c       |  17 ++---------------
 external/bsd/dhcpcd/dist/src/dhcpcd.c      |   3 +--
 external/bsd/dhcpcd/dist/src/if-bsd.c      |   9 ++++++---
 external/bsd/dhcpcd/dist/src/ipv6nd.c      |  16 ----------------
 5 files changed, 10 insertions(+), 37 deletions(-)

diffs (139 lines):

diff -r 298fe9f1f663 -r bec24072bca9 external/bsd/dhcpcd/dist/hooks/30-hostname
--- a/external/bsd/dhcpcd/dist/hooks/30-hostname        Wed Jun 26 17:46:08 2019 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/30-hostname        Wed Jun 26 17:47:47 2019 +0000
@@ -80,7 +80,7 @@
        set_hostname_vars
 
        if [ -n "$old_fqdn" ]; then
-               if ${hfqdn} || ! ${hsort}; then
+               if ${hfqdn} || ! ${hshort}; then
                        [ "$hostname" = "$old_fqdn" ]
                else
                        [ "$hostname" = "${old_fqdn%%.*}" ]
diff -r 298fe9f1f663 -r bec24072bca9 external/bsd/dhcpcd/dist/src/dhcp6.c
--- a/external/bsd/dhcpcd/dist/src/dhcp6.c      Wed Jun 26 17:46:08 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcp6.c      Wed Jun 26 17:47:47 2019 +0000
@@ -3783,6 +3783,8 @@
                        /* 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 @@
 }
 
 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;
diff -r 298fe9f1f663 -r bec24072bca9 external/bsd/dhcpcd/dist/src/dhcpcd.c
--- a/external/bsd/dhcpcd/dist/src/dhcpcd.c     Wed Jun 26 17:46:08 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcpcd.c     Wed Jun 26 17:47:47 2019 +0000
@@ -1081,8 +1081,7 @@
                        dhcpcd_linkoverflow(ctx);
                        return;
                }
-               if (errno != ENOTSUP)
-                       logerr(__func__);
+               logerr(__func__);
        }
 }
 
diff -r 298fe9f1f663 -r bec24072bca9 external/bsd/dhcpcd/dist/src/if-bsd.c
--- a/external/bsd/dhcpcd/dist/src/if-bsd.c     Wed Jun 26 17:46:08 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/if-bsd.c     Wed Jun 26 17:47:47 2019 +0000
@@ -1063,7 +1063,7 @@
                return 0;
 
        if (if_copyrt(ctx, &rt, rtm) == -1)
-               return -1;
+               return errno == ENOTSUP ? 0 : -1;
 
 #ifdef INET6
        /*
@@ -1305,7 +1305,8 @@
                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 @@
                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;
        }
diff -r 298fe9f1f663 -r bec24072bca9 external/bsd/dhcpcd/dist/src/ipv6nd.c
--- a/external/bsd/dhcpcd/dist/src/ipv6nd.c     Wed Jun 26 17:46:08 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/ipv6nd.c     Wed Jun 26 17:47:47 2019 +0000
@@ -382,9 +382,6 @@
        else {
                logwarnx("%s: no IPv6 Routers available", ifp->name);
                ipv6nd_drop(ifp);
-#ifdef DHCP6
-               dhcp6_dropnondelegates(ifp);
-#endif
        }
 }
 
@@ -1525,9 +1522,6 @@
        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 @@
                 * as well punt it. */
                if (!valid && !validone)
                        ipv6nd_free_ra(rap);
-#ifdef DHCP6
-               else
-                       anyvalid = true;
-#endif
        }
 
        if (timespecisset(&next))
@@ -1616,12 +1606,6 @@
                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



Home | Main Index | Thread Index | Old Index