summaryrefslogtreecommitdiff
path: root/usr.sbin/eigrpd
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2016-04-15 13:27:59 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2016-04-15 13:27:59 +0000
commitf43332626acb79915cf8894f8ea4fa520440016e (patch)
treece1430dd211fd7edac7d975fe09a1bdb25cfc275 /usr.sbin/eigrpd
parent936627c2c4cee12a29bbbf006db6731528ac43ea (diff)
Fix segfault on reloading the config multiple times.
Diffstat (limited to 'usr.sbin/eigrpd')
-rw-r--r--usr.sbin/eigrpd/eigrpe.c3
-rw-r--r--usr.sbin/eigrpd/rde.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/eigrpd/eigrpe.c b/usr.sbin/eigrpd/eigrpe.c
index 2702b5f05b4..85ea783da42 100644
--- a/usr.sbin/eigrpd/eigrpe.c
+++ b/usr.sbin/eigrpd/eigrpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eigrpe.c,v 1.17 2016/04/15 13:21:45 renato Exp $ */
+/* $OpenBSD: eigrpe.c,v 1.18 2016/04/15 13:27:58 renato Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -358,6 +358,7 @@ eigrpe_dispatch_main(int fd, short event, void *bula)
fatal(NULL);
memcpy(niface, imsg.data, sizeof(struct iface));
+ TAILQ_INIT(&niface->ei_list);
TAILQ_INIT(&niface->addr_list);
TAILQ_INSERT_TAIL(&nconf->iface_list, niface, entry);
break;
diff --git a/usr.sbin/eigrpd/rde.c b/usr.sbin/eigrpd/rde.c
index 622be7914cc..9dfd4d3ebc6 100644
--- a/usr.sbin/eigrpd/rde.c
+++ b/usr.sbin/eigrpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.12 2016/04/15 13:21:45 renato Exp $ */
+/* $OpenBSD: rde.c,v 1.13 2016/04/15 13:27:58 renato Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -407,6 +407,7 @@ rde_dispatch_parent(int fd, short event, void *bula)
fatal(NULL);
memcpy(niface, imsg.data, sizeof(struct iface));
+ TAILQ_INIT(&niface->ei_list);
TAILQ_INIT(&niface->addr_list);
TAILQ_INSERT_TAIL(&nconf->iface_list, niface, entry);
break;