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 Import dhcpcd-7.0.0 with the follow...



details:   https://anonhg.NetBSD.org/src/rev/e357e355f794
branches:  trunk
changeset: 358481:e357e355f794
user:      roy <roy%NetBSD.org@localhost>
date:      Mon Jan 01 11:48:51 2018 +0000

description:
Import dhcpcd-7.0.0 with the following changes:
  *  dhcp: when unicasting on L3, unicast on L2 as well
  *  dhcp: when rebooting, don't set cidaddr
  *  dhcp6: don't listen on IPv6 addresses when not using DHCPv6
  *  dhcp: only set probe state when probing (fixes REBOOT reason)
  *  ipv6: disable kernel RA if interface is active
  *  hooks: set protocol to link for link layer events

diffstat:

 external/bsd/dhcpcd/dist/LICENSE                         |   2 +-
 external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in     |   2 +-
 external/bsd/dhcpcd/dist/src/arp.c                       |   2 +-
 external/bsd/dhcpcd/dist/src/arp.h                       |   2 +-
 external/bsd/dhcpcd/dist/src/auth.c                      |   2 +-
 external/bsd/dhcpcd/dist/src/auth.h                      |   2 +-
 external/bsd/dhcpcd/dist/src/bpf.h                       |   2 +-
 external/bsd/dhcpcd/dist/src/common.c                    |   2 +-
 external/bsd/dhcpcd/dist/src/common.h                    |   2 +-
 external/bsd/dhcpcd/dist/src/control.c                   |   2 +-
 external/bsd/dhcpcd/dist/src/control.h                   |   2 +-
 external/bsd/dhcpcd/dist/src/defs.h                      |   4 +-
 external/bsd/dhcpcd/dist/src/dev.c                       |   2 +-
 external/bsd/dhcpcd/dist/src/dev.h                       |   2 +-
 external/bsd/dhcpcd/dist/src/dhcp-common.c               |   2 +-
 external/bsd/dhcpcd/dist/src/dhcp-common.h               |   2 +-
 external/bsd/dhcpcd/dist/src/dhcp.h                      |   2 +-
 external/bsd/dhcpcd/dist/src/dhcp6.c                     |  19 ++++----
 external/bsd/dhcpcd/dist/src/dhcp6.h                     |   2 +-
 external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in        |   2 +-
 external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in        |   2 +-
 external/bsd/dhcpcd/dist/src/dhcpcd.8.in                 |   2 +-
 external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in            |   2 +-
 external/bsd/dhcpcd/dist/src/dhcpcd.h                    |   2 +-
 external/bsd/dhcpcd/dist/src/eloop.c                     |   2 +-
 external/bsd/dhcpcd/dist/src/eloop.h                     |   2 +-
 external/bsd/dhcpcd/dist/src/if-bsd.c                    |   2 +-
 external/bsd/dhcpcd/dist/src/if-linux-wext.c             |   2 +-
 external/bsd/dhcpcd/dist/src/if-linux.c                  |  12 ++++-
 external/bsd/dhcpcd/dist/src/if-options.h                |   2 +-
 external/bsd/dhcpcd/dist/src/if-sun.c                    |   2 +-
 external/bsd/dhcpcd/dist/src/if.c                        |  36 +++++++++------
 external/bsd/dhcpcd/dist/src/if.h                        |   8 ++-
 external/bsd/dhcpcd/dist/src/ipv4.c                      |   2 +-
 external/bsd/dhcpcd/dist/src/ipv4.h                      |   2 +-
 external/bsd/dhcpcd/dist/src/ipv4ll.c                    |   2 +-
 external/bsd/dhcpcd/dist/src/ipv4ll.h                    |   2 +-
 external/bsd/dhcpcd/dist/src/ipv6.c                      |   2 +-
 external/bsd/dhcpcd/dist/src/ipv6.h                      |   2 +-
 external/bsd/dhcpcd/dist/src/ipv6nd.c                    |   4 +-
 external/bsd/dhcpcd/dist/src/ipv6nd.h                    |   2 +-
 external/bsd/dhcpcd/dist/src/logerr.c                    |   2 +-
 external/bsd/dhcpcd/dist/src/logerr.h                    |   2 +-
 external/bsd/dhcpcd/dist/src/route.c                     |   2 +-
 external/bsd/dhcpcd/dist/src/route.h                     |   2 +-
 external/bsd/dhcpcd/dist/src/sa.c                        |   2 +-
 external/bsd/dhcpcd/dist/src/sa.h                        |   2 +-
 external/bsd/dhcpcd/dist/src/script.c                    |   8 +-
 external/bsd/dhcpcd/dist/src/script.h                    |   2 +-
 external/bsd/dhcpcd/dist/tests/crypt/run-test.c          |   2 +-
 external/bsd/dhcpcd/dist/tests/crypt/test.h              |   2 +-
 external/bsd/dhcpcd/dist/tests/crypt/test_hmac_md5.c     |   2 +-
 external/bsd/dhcpcd/dist/tests/eloop-bench/eloop-bench.c |   2 +-
 53 files changed, 101 insertions(+), 82 deletions(-)

diffs (truncated from 809 to 300 lines):

diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/LICENSE
--- a/external/bsd/dhcpcd/dist/LICENSE  Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/LICENSE  Mon Jan 01 11:48:51 2018 +0000
@@ -1,4 +1,4 @@
-Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in
--- a/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in      Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in      Mon Jan 01 11:48:51 2018 +0000
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2006-2017 Roy Marples
+.\" Copyright (c) 2006-2018 Roy Marples
 .\" All rights reserved
 .\"
 .\" Redistribution and use in source and binary forms, with or without
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/arp.c
--- a/external/bsd/dhcpcd/dist/src/arp.c        Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/arp.c        Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - ARP handler
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/arp.h
--- a/external/bsd/dhcpcd/dist/src/arp.h        Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/arp.h        Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/auth.c
--- a/external/bsd/dhcpcd/dist/src/auth.c       Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/auth.c       Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/auth.h
--- a/external/bsd/dhcpcd/dist/src/auth.h       Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/auth.h       Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/bpf.h
--- a/external/bsd/dhcpcd/dist/src/bpf.h        Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/bpf.h        Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd: BPF arp and bootp filtering
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/common.c
--- a/external/bsd/dhcpcd/dist/src/common.c     Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/common.c     Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/common.h
--- a/external/bsd/dhcpcd/dist/src/common.h     Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/common.h     Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/control.c
--- a/external/bsd/dhcpcd/dist/src/control.c    Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/control.c    Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/control.h
--- a/external/bsd/dhcpcd/dist/src/control.h    Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/control.h    Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/defs.h
--- a/external/bsd/dhcpcd/dist/src/defs.h       Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/defs.h       Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -28,7 +28,7 @@
 #define CONFIG_H
 
 #define PACKAGE                        "dhcpcd"
-#define VERSION                        "7.0.0-rc4"
+#define VERSION                        "7.0.0"
 
 #ifndef CONFIG
 # define CONFIG                        SYSCONFDIR "/" PACKAGE ".conf"
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/dev.c
--- a/external/bsd/dhcpcd/dist/src/dev.c        Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/dev.c        Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/dev.h
--- a/external/bsd/dhcpcd/dist/src/dev.h        Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/dev.h        Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/dhcp-common.c
--- a/external/bsd/dhcpcd/dist/src/dhcp-common.c        Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcp-common.c        Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/dhcp-common.h
--- a/external/bsd/dhcpcd/dist/src/dhcp-common.h        Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcp-common.h        Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/dhcp.h
--- a/external/bsd/dhcpcd/dist/src/dhcp.h       Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcp.h       Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/dhcp6.c
--- a/external/bsd/dhcpcd/dist/src/dhcp6.c      Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcp6.c      Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
@@ -1099,7 +1099,7 @@
        memset(&dst, 0, sizeof(dst));
        dst.sin6_family = AF_INET6;
        dst.sin6_port = htons(DHCP6_SERVER_PORT);
-#ifdef SIN6_LEN
+#ifdef HAVE_SA_LEN
        dst.sin6_len = sizeof(dst);
 #endif
 
@@ -2051,7 +2051,7 @@
                        a->flags &= ~(IPV6_AF_STALE |
                                      IPV6_AF_EXTENDED |
                                      IPV6_AF_REQUEST);
-                       if (a->prefix_vltime != ntohl(pdp.vltime))
+                       if (a->prefix_vltime != pdp.vltime)
                                a->flags |= IPV6_AF_NEW;
                }
 
@@ -2405,6 +2405,7 @@
                return -1;
        retval = -1;
        lease = NULL;
+       free(state->new);
        state->new_len = dhcp_read_lease_fd(fd, (void **)&lease);
        state->new = lease;
        if (fd_opened)
@@ -3676,8 +3677,6 @@
        if (state != NULL) {
                switch (init_state) {
                case DH6S_INIT:
-                       /* This should only happen on OS's where we keep state
-                        * on carrier down, such as NetBSD-8. */
                        goto gogogo;
                case DH6S_INFORM:
                        if (state->state == DH6S_INFORMED)
@@ -3695,8 +3694,6 @@
                        }
                        break;
                case DH6S_CONFIRM:
-                       /* This should only happen on OS's where we keep state
-                        * on carrier down, such as NetBSD-8. */
                        init_state = DH6S_INIT;
                        goto gogogo;
                default:
@@ -3879,16 +3876,18 @@
 dhcp6_handleifa(int cmd, struct ipv6_addr *ia)
 {
        struct dhcp6_state *state;
+       struct interface *ifp = ia->iface;
 
        /* If not running in master mode, listen to this address */
        if (cmd == RTM_NEWADDR &&
            !(ia->addr_flags & IN6_IFF_NOTUSEABLE) &&
-           ia->iface->active == IF_ACTIVE_USER &&
-           !(ia->iface->ctx->options & DHCPCD_MASTER) &&
+           ifp->active == IF_ACTIVE_USER &&
+           !(ifp->ctx->options & DHCPCD_MASTER) &&
+           ifp->options->options & DHCPCD_DHCP6 &&
            ia->dhcp6_fd == -1)
                dhcp6_listen(ia->iface->ctx, ia);
 
-       if ((state = D6_STATE(ia->iface)) != NULL)
+       if ((state = D6_STATE(ifp)) != NULL)
                ipv6_handleifa_addrs(cmd, &state->addrs, ia);
 }
 
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/dhcp6.h
--- a/external/bsd/dhcpcd/dist/src/dhcp6.h      Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcp6.h      Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in
--- a/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in Mon Jan 01 11:48:51 2018 +0000
@@ -6,7 +6,7 @@
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c0dfe1dae114 -r e357e355f794 external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in
--- a/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in Mon Jan 01 11:28:33 2018 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in Mon Jan 01 11:48:51 2018 +0000
@@ -1,6 +1,6 @@
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2017 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2018 Roy Marples <roy%marples.name@localhost>



Home | Main Index | Thread Index | Old Index