No need to pass the link local and hw address around, we have it
authorflorian <florian@openbsd.org>
Sun, 7 Mar 2021 10:30:13 +0000 (10:30 +0000)
committerflorian <florian@openbsd.org>
Sun, 7 Mar 2021 10:30:13 +0000 (10:30 +0000)
already in the interface on the engine side.

sbin/slaacd/engine.c
sbin/slaacd/frontend.c
sbin/slaacd/slaacd.h

index 950020f..4ed5fa6 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: engine.c,v 1.64 2021/03/07 10:29:12 florian Exp $     */
+/*     $OpenBSD: engine.c,v 1.65 2021/03/07 10:30:13 florian Exp $     */
 
 /*
  * Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -727,8 +727,7 @@ engine_dispatch_main(int fd, short event, void *bula)
                            &addr_proposal->uptime))
                                fatal("clock_gettime");
                        addr_proposal->if_index = imsg_addrinfo.if_index;
-                       memcpy(&addr_proposal->hw_address,
-                           &imsg_addrinfo.hw_address,
+                       memcpy(&addr_proposal->hw_address, &iface->hw_address,
                            sizeof(addr_proposal->hw_address));
                        addr_proposal->addr = imsg_addrinfo.addr;
                        addr_proposal->mask = imsg_addrinfo.mask;
index 0ab1ab1..ab4dba6 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: frontend.c,v 1.49 2021/01/19 16:49:56 florian Exp $   */
+/*     $OpenBSD: frontend.c,v 1.50 2021/03/07 10:30:13 florian Exp $   */
 
 /*
  * Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -562,8 +562,6 @@ update_autoconf_addresses(uint32_t if_index, char* if_name)
 
        memset(&imsg_addrinfo, 0, sizeof(imsg_addrinfo));
        imsg_addrinfo.if_index = if_index;
-       get_lladdr(if_name, &imsg_addrinfo.hw_address,
-           &imsg_addrinfo.ll_address);
 
        memset(&imsg_link_state, 0, sizeof(imsg_link_state));
        imsg_link_state.if_index = if_index;
index 0e41d61..38de182 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: slaacd.h,v 1.29 2021/02/27 10:28:12 florian Exp $     */
+/*     $OpenBSD: slaacd.h,v 1.30 2021/03/07 10:30:13 florian Exp $     */
 
 /*
  * Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -169,8 +169,6 @@ struct ctl_engine_info_rdns_proposal {
 
 struct imsg_addrinfo {
        uint32_t                if_index;
-       struct ether_addr       hw_address;
-       struct sockaddr_in6     ll_address;
        struct sockaddr_in6     addr;
        struct in6_addr         mask;
        int                     privacy;