summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authordenis <denis@cvs.openbsd.org>2020-05-16 15:54:13 +0000
committerdenis <denis@cvs.openbsd.org>2020-05-16 15:54:13 +0000
commit311969b5a86107ad1ec94ea14664ec4ab8d8b76b (patch)
tree0d95c11dd2ba63ac7aecbb68187793aaf614b213 /usr.sbin
parent54ed90da550e897a536eae2fa44775f934776e61 (diff)
When IMSG_IFADD is removed, IMSG_IFDELETE becomes useless
OK remi@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ospf6d/kroute.c8
-rw-r--r--usr.sbin/ospf6d/ospf6d.h3
-rw-r--r--usr.sbin/ospf6d/ospfe.c16
-rw-r--r--usr.sbin/ospf6d/rde.c16
4 files changed, 4 insertions, 39 deletions
diff --git a/usr.sbin/ospf6d/kroute.c b/usr.sbin/ospf6d/kroute.c
index 6a6fce0be80..4d2588ea643 100644
--- a/usr.sbin/ospf6d/kroute.c
+++ b/usr.sbin/ospf6d/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.62 2019/12/16 08:28:33 denis Exp $ */
+/* $OpenBSD: kroute.c,v 1.63 2020/05/16 15:54:12 denis Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -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;
}
diff --git a/usr.sbin/ospf6d/ospf6d.h b/usr.sbin/ospf6d/ospf6d.h
index 5d4a243b4c7..7561d65f27f 100644
--- a/usr.sbin/ospf6d/ospf6d.h
+++ b/usr.sbin/ospf6d/ospf6d.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospf6d.h,v 1.47 2020/05/16 15:53:03 denis Exp $ */
+/* $OpenBSD: ospf6d.h,v 1.48 2020/05/16 15:54:12 denis Exp $ */
/*
* Copyright (c) 2004, 2007 Esben Norby <norby@openbsd.org>
@@ -103,7 +103,6 @@ enum imsg_type {
IMSG_KROUTE_CHANGE,
IMSG_KROUTE_DELETE,
IMSG_IFINFO,
- IMSG_IFDELETE,
IMSG_IFADDRNEW,
IMSG_IFADDRDEL,
IMSG_NEIGHBOR_UP,
diff --git a/usr.sbin/ospf6d/ospfe.c b/usr.sbin/ospf6d/ospfe.c
index b6f8a2b4a9f..6fa80b6d891 100644
--- a/usr.sbin/ospf6d/ospfe.c
+++ b/usr.sbin/ospf6d/ospfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfe.c,v 1.62 2020/05/16 15:53:03 denis Exp $ */
+/* $OpenBSD: ospfe.c,v 1.63 2020/05/16 15:54:12 denis Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -257,7 +257,6 @@ ospfe_dispatch_main(int fd, short event, void *bula)
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)
@@ -327,19 +326,6 @@ ospfe_dispatch_main(int fd, short event, void *bula)
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 +
sizeof(struct ifaddrchange))
diff --git a/usr.sbin/ospf6d/rde.c b/usr.sbin/ospf6d/rde.c
index 62d259fc689..bc62da0861e 100644
--- a/usr.sbin/ospf6d/rde.c
+++ b/usr.sbin/ospf6d/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.87 2020/05/16 15:53:03 denis Exp $ */
+/* $OpenBSD: rde.c,v 1.88 2020/05/16 15:54:12 denis Exp $ */
/*
* Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org>
@@ -651,7 +651,6 @@ rde_dispatch_parent(int fd, short event, void *bula)
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)
@@ -734,19 +733,6 @@ rde_dispatch_parent(int fd, short event, void *bula)
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 +
sizeof(struct ifaddrchange))