-/* $OpenBSD: parse.y,v 1.6 2018/07/20 17:55:09 bket Exp $ */
+/* $OpenBSD: parse.y,v 1.7 2018/07/20 20:34:18 florian Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
while((iface = SIMPLEQ_FIRST(&xconf->ra_iface_list)) != NULL) {
SIMPLEQ_REMOVE_HEAD(&xconf->ra_iface_list, entry);
- free(iface);
+ free_ra_iface_conf(iface);
}
free(xconf);
-/* $OpenBSD: rad.c,v 1.10 2018/07/20 17:55:09 bket Exp $ */
+/* $OpenBSD: rad.c,v 1.11 2018/07/20 20:34:18 florian Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
int main_reload(void);
int main_sendboth(enum imsg_type, void *, uint16_t);
-void free_ra_iface_conf(struct ra_iface_conf *);
void in6_prefixlen2mask(struct in6_addr *, int len);
struct rad_conf *main_conf;
free_ra_iface_conf(struct ra_iface_conf *ra_iface_conf)
{
struct ra_prefix_conf *prefix;
+ struct ra_rdnss_conf *ra_rdnss;
+ struct ra_dnssl_conf *ra_dnssl;
if (!ra_iface_conf)
return;
free(ra_iface_conf->autoprefix);
- while ((prefix = SIMPLEQ_FIRST(&ra_iface_conf->ra_prefix_list))
- != NULL) {
+ while ((prefix = SIMPLEQ_FIRST(&ra_iface_conf->ra_prefix_list)) !=
+ NULL) {
SIMPLEQ_REMOVE_HEAD(&ra_iface_conf->ra_prefix_list, entry);
free(prefix);
}
+ while ((ra_rdnss = SIMPLEQ_FIRST(&ra_iface_conf->ra_rdnss_list)) !=
+ NULL) {
+ SIMPLEQ_REMOVE_HEAD(&ra_iface_conf->ra_rdnss_list, entry);
+ free(ra_rdnss);
+ }
+
+ while ((ra_dnssl = SIMPLEQ_FIRST(&ra_iface_conf->ra_dnssl_list)) !=
+ NULL) {
+ SIMPLEQ_REMOVE_HEAD(&ra_iface_conf->ra_dnssl_list, entry);
+ free(ra_dnssl);
+ }
+
free(ra_iface_conf);
}
-/* $OpenBSD: rad.h,v 1.12 2018/07/20 17:55:09 bket Exp $ */
+/* $OpenBSD: rad.h,v 1.13 2018/07/20 20:34:18 florian Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
struct rad_conf *config_new_empty(void);
void config_clear(struct rad_conf *);
-
-void mask_prefix(struct in6_addr*, int len);
+void free_ra_iface_conf(struct ra_iface_conf *);
+void mask_prefix(struct in6_addr*, int len);
const char *sin6_to_str(struct sockaddr_in6 *);
const char *in6_to_str(struct in6_addr *);