summaryrefslogtreecommitdiff
path: root/usr.sbin/ospf6d/rde.c
diff options
context:
space:
mode:
authordenis <denis@cvs.openbsd.org>2020-02-17 08:12:23 +0000
committerdenis <denis@cvs.openbsd.org>2020-02-17 08:12:23 +0000
commitefa3b79b4c58a7b7d146969ea788a5204e5d3a69 (patch)
tree8e5a7a12602a09fa5506cc6f3efc1545940c2040 /usr.sbin/ospf6d/rde.c
parent05d1ce7d0fbe511ee0543564377cf275ca67f520 (diff)
Bring ospf6d closer to ospfd
- update debug messages to be more precise - simplify call to lsa_self() - drop lsa_find_lsid() redondant parameters OK remi@
Diffstat (limited to 'usr.sbin/ospf6d/rde.c')
-rw-r--r--usr.sbin/ospf6d/rde.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/usr.sbin/ospf6d/rde.c b/usr.sbin/ospf6d/rde.c
index de193ff75a4..e8c7c030d6d 100644
--- a/usr.sbin/ospf6d/rde.c
+++ b/usr.sbin/ospf6d/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.83 2020/01/21 15:17:12 denis Exp $ */
+/* $OpenBSD: rde.c,v 1.84 2020/02/17 08:12:22 denis Exp $ */
/*
* Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org>
@@ -455,17 +455,10 @@ rde_dispatch_imsg(int fd, short event, void *bula)
rde_req_list_del(nbr, &lsa->hdr);
- self = lsa_self(lsa);
- if (self) {
- if (v == NULL)
- /* LSA is no longer announced,
- * remove by premature aging. */
- lsa_flush(nbr, lsa);
- else
- lsa_reflood(v, lsa);
- } else if (lsa_add(nbr, lsa))
- /* delayed lsa, don't flood yet */
- break;
+ if (!(self = lsa_self(nbr, lsa, v)))
+ if (lsa_add(nbr, lsa))
+ /* delayed lsa */
+ break;
/* flood and perhaps ack LSA */
imsg_compose_event(iev_ospfe, IMSG_LS_FLOOD,
@@ -1683,8 +1676,7 @@ orig_asext_lsa(struct kroute *kr, u_int16_t age)
memcpy((char *)lsa + sizeof(struct lsa_hdr) + sizeof(struct lsa_asext),
&kr->prefix, LSA_PREFIXSIZE(kr->prefixlen));
- lsa->hdr.ls_id = lsa_find_lsid(&asext_tree, lsa->hdr.type,
- lsa->hdr.adv_rtr, comp_asext, lsa);
+ lsa->hdr.ls_id = lsa_find_lsid(&asext_tree, comp_asext, lsa);
if (age == MAX_AGE) {
/* inherit metric and ext_tag from the current LSA,