From 5aa580cf6f42561530e086619eae94142e47d59a Mon Sep 17 00:00:00 2001 From: naddy Date: Thu, 20 Jan 2022 14:03:31 +0000 Subject: [PATCH] ospf6d: fix -Wunused-but-set-variable warnings ospf6d.c: sync a missing bit of (disabled) code with ospfd rde.c: ifdef out some more incomplete code ok denis@ claudio@ --- usr.sbin/ospf6d/ospf6d.c | 4 ++-- usr.sbin/ospf6d/rde.c | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/usr.sbin/ospf6d/ospf6d.c b/usr.sbin/ospf6d/ospf6d.c index b1193eaf336..16cd042a29c 100644 --- a/usr.sbin/ospf6d/ospf6d.c +++ b/usr.sbin/ospf6d/ospf6d.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospf6d.c,v 1.51 2021/09/06 13:32:18 deraadt Exp $ */ +/* $OpenBSD: ospf6d.c,v 1.52 2022/01/20 14:03:31 naddy Exp $ */ /* * Copyright (c) 2005 Claudio Jeker @@ -738,7 +738,7 @@ merge_config(struct ospfd_conf *conf, struct ospfd_conf *xconf) if_start(conf, iface); } } - if (a->dirty) { + if (a->dirty || rchange) { a->dirty = 0; orig_rtr_lsa(LIST_FIRST(&a->iface_list)->area); } diff --git a/usr.sbin/ospf6d/rde.c b/usr.sbin/ospf6d/rde.c index f4a047206ec..6aadf964ef4 100644 --- a/usr.sbin/ospf6d/rde.c +++ b/usr.sbin/ospf6d/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.89 2021/01/19 09:54:08 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.90 2022/01/20 14:03:32 naddy Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker @@ -1249,8 +1249,10 @@ void rde_summary_update(struct rt_node *rte, struct area *area) { struct vertex *v = NULL; -//XXX struct lsa *lsa; +#if 0 /* XXX */ + struct lsa *lsa; u_int16_t type = 0; +#endif /* first check if we actually need to announce this route */ if (!(rte->d_type == DT_NET || rte->flags & OSPF_RTR_E)) @@ -1271,13 +1273,13 @@ rde_summary_update(struct rt_node *rte, struct area *area) /* TODO inter-area network route stuff */ /* TODO intra-area stuff -- condense LSA ??? */ +#if 0 /* XXX a lot todo */ if (rte->d_type == DT_NET) { type = LSA_TYPE_INTER_A_PREFIX; } else if (rte->d_type == DT_RTR) { type = LSA_TYPE_INTER_A_ROUTER; } else -#if 0 /* XXX a lot todo */ /* update lsa but only if it was changed */ v = lsa_find(area, type, rte->prefix.s_addr, rde_router_id()); lsa = orig_sum_lsa(rte, area, type, rte->invalid); -- 2.20.1