Following https://marc.info/?l=openbsd-tech&m=158946552515632&w=2, when
IMSG_IFADD is removed, IMSG_IFDELETE becomes useless...
Index: kroute.c
===================================================================
RCS file: /home/denis/dev/cvs/src/usr.sbin/ospf6d/kroute.c,v
retrieving revision 1.62
diff -u -p -r1.62 kroute.c
--- kroute.c 16 Dec 2019 08:28:33 -0000 1.62
+++ kroute.c 14 May 2020 18:06:16 -0000
@@ -1023,12 +1023,6 @@ if_announce(void *msg)
break;
case IFAN_DEPARTURE:
iface = if_find(ifan->ifan_index);
- if (iface->cflags & F_IFACE_CONFIGURED) {
- main_imsg_compose_rde(IMSG_IFDELETE, 0,
- &iface->ifindex, sizeof(iface->ifindex));
- main_imsg_compose_ospfe(IMSG_IFDELETE, 0,
- &iface->ifindex, sizeof(iface->ifindex));
- }
if_del(iface);
break;
}
Index: ospf6d.h
===================================================================
RCS file: /home/denis/dev/cvs/src/usr.sbin/ospf6d/ospf6d.h,v
retrieving revision 1.47
diff -u -p -r1.47 ospf6d.h
--- ospf6d.h 14 May 2020 18:05:50 -0000 1.47
+++ ospf6d.h 14 May 2020 18:06:30 -0000
@@ -103,7 +103,6 @@ enum imsg_type {
IMSG_KROUTE_CHANGE,
IMSG_KROUTE_DELETE,
IMSG_IFINFO,
- IMSG_IFDELETE,
IMSG_IFADDRNEW,
IMSG_IFADDRDEL,
IMSG_NEIGHBOR_UP,
Index: ospfe.c
===================================================================
RCS file: /home/denis/dev/cvs/src/usr.sbin/ospf6d/ospfe.c,v
retrieving revision 1.62
diff -u -p -r1.62 ospfe.c
--- ospfe.c 14 May 2020 18:05:50 -0000 1.62
+++ ospfe.c 14 May 2020 18:07:26 -0000
@@ -257,7 +257,6 @@ ospfe_dispatch_main(int fd, short event,
struct imsgev *iev = bula;
struct imsgbuf *ibuf = &iev->ibuf;
int n, stub_changed, shut = 0, isvalid, wasvalid;
- unsigned int ifindex;
if (event & EV_READ) {
if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
@@ -326,19 +325,6 @@ ospfe_dispatch_main(int fd, short event,
if_fsm(iface, IF_EVT_DOWN);
log_warnx("interface %s down", iface->name);
}
- break;
- case IMSG_IFDELETE:
- if (imsg.hdr.len != IMSG_HEADER_SIZE +
- sizeof(ifindex))
- fatalx("IFDELETE imsg with wrong len");
-
- memcpy(&ifindex, imsg.data, sizeof(ifindex));
- iface = if_find(ifindex);
- if (iface == NULL)
- fatalx("interface lost in ospfe");
-
- LIST_REMOVE(iface, entry);
- if_del(iface);
break;
case IMSG_IFADDRNEW:
if (imsg.hdr.len != IMSG_HEADER_SIZE +
Index: rde.c
===================================================================
RCS file: /home/denis/dev/cvs/src/usr.sbin/ospf6d/rde.c,v
retrieving revision 1.87
diff -u -p -r1.87 rde.c
--- rde.c 14 May 2020 18:05:50 -0000 1.87
+++ rde.c 14 May 2020 18:07:18 -0000
@@ -651,7 +651,6 @@ rde_dispatch_parent(int fd, short event,
struct imsgbuf *ibuf = &iev->ibuf;
ssize_t n;
int shut = 0, link_ok, prev_link_ok, orig_lsa;
- unsigned int ifindex;
if (event & EV_READ) {
if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
@@ -733,19 +732,6 @@ rde_dispatch_parent(int fd, short event,
orig_intra_area_prefix_lsas(iface->area);
- break;
- case IMSG_IFDELETE:
- if (imsg.hdr.len != IMSG_HEADER_SIZE +
- sizeof(ifindex))
- fatalx("IFDELETE imsg with wrong len");
-
- memcpy(&ifindex, imsg.data, sizeof(ifindex));
- iface = if_find(ifindex);
- if (iface == NULL)
- fatalx("interface lost in rde");
-
- LIST_REMOVE(iface, entry);
- if_del(iface);
break;
case IMSG_IFADDRNEW:
if (imsg.hdr.len != IMSG_HEADER_SIZE +