No need to copy rdns_lifetime around with an IMSG, it gets send to the
authorflorian <florian@openbsd.org>
Fri, 20 Jul 2018 20:35:00 +0000 (20:35 +0000)
committerflorian <florian@openbsd.org>
Fri, 20 Jul 2018 20:35:00 +0000 (20:35 +0000)
engine end frontend as part of ra_iface_conf.

Spotted after explaining to bket@ that a similar pattern is not needed
for the mtu option.

usr.sbin/rad/engine.c
usr.sbin/rad/frontend.c
usr.sbin/rad/rad.c
usr.sbin/rad/rad.h

index 5d18643..db31fb2 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: engine.c,v 1.7 2018/07/15 09:28:21 florian Exp $      */
+/*     $OpenBSD: engine.c,v 1.8 2018/07/20 20:35:00 florian Exp $      */
 
 /*
  * Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -355,9 +355,6 @@ engine_dispatch_main(int fd, short event, void *bula)
                        SIMPLEQ_INSERT_TAIL(&ra_iface_conf->ra_prefix_list,
                            ra_prefix_conf, entry);
                        break;
-               case IMSG_RECONF_RA_RDNS_LIFETIME:
-                       ra_iface_conf->rdns_lifetime = *((uint32_t *)imsg.data);
-                       break;
                case IMSG_RECONF_RA_RDNSS:
                        if ((ra_rdnss_conf = malloc(sizeof(struct
                            ra_rdnss_conf))) == NULL)
index afa4fb1..e80879c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: frontend.c,v 1.13 2018/07/20 20:33:29 florian Exp $   */
+/*     $OpenBSD: frontend.c,v 1.14 2018/07/20 20:35:00 florian Exp $   */
 
 /*
  * Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -397,9 +397,6 @@ frontend_dispatch_main(int fd, short event, void *bula)
                        SIMPLEQ_INSERT_TAIL(&ra_iface_conf->ra_prefix_list,
                            ra_prefix_conf, entry);
                        break;
-               case IMSG_RECONF_RA_RDNS_LIFETIME:
-                       ra_iface_conf->rdns_lifetime = *((uint32_t *)imsg.data);
-                       break;
                case IMSG_RECONF_RA_RDNSS:
                        if ((ra_rdnss_conf = malloc(sizeof(struct
                            ra_rdnss_conf))) == NULL)
index 5343f9a..b741dd5 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: rad.c,v 1.11 2018/07/20 20:34:18 florian Exp $        */
+/*     $OpenBSD: rad.c,v 1.12 2018/07/20 20:35:00 florian Exp $        */
 
 /*
  * Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -621,10 +621,6 @@ main_imsg_send_config(struct rad_conf *xconf)
                            ra_prefix_conf, sizeof(*ra_prefix_conf)) == -1)
                                return (-1);
                }
-               if (main_sendboth(IMSG_RECONF_RA_RDNS_LIFETIME,
-                   &ra_iface_conf->rdns_lifetime,
-                   sizeof(ra_iface_conf->rdns_lifetime)) == -1)
-                       return (-1);
                SIMPLEQ_FOREACH(ra_rdnss_conf, &ra_iface_conf->ra_rdnss_list,
                    entry) {
                        if (main_sendboth(IMSG_RECONF_RA_RDNSS, ra_rdnss_conf,
index b7b68d3..3feeb80 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: rad.h,v 1.13 2018/07/20 20:34:18 florian Exp $        */
+/*     $OpenBSD: rad.h,v 1.14 2018/07/20 20:35:00 florian Exp $        */
 
 /*
  * Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -59,7 +59,6 @@ enum imsg_type {
        IMSG_RECONF_RA_IFACE,
        IMSG_RECONF_RA_AUTOPREFIX,
        IMSG_RECONF_RA_PREFIX,
-       IMSG_RECONF_RA_RDNS_LIFETIME,
        IMSG_RECONF_RA_RDNSS,
        IMSG_RECONF_RA_DNSSL,
        IMSG_RECONF_END,