diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-10-18 15:40:37 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-10-18 15:40:37 +0000 |
commit | 00b2bc17f76ef9941eb9183d0da44e00587e00b4 (patch) | |
tree | 7cf76c2cd76f46ca45f5abc4d97961f23a6c8932 /usr.sbin | |
parent | faa3e8c51b7ca3e9b7766d00a66eb969c33a9fd2 (diff) |
Cleanup interface code a minimal bit. There is no need for if_shutdown(),
especially it got called in the wrong place. OK norby@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ospfd/interface.c | 12 | ||||
-rw-r--r-- | usr.sbin/ospfd/ospfd.c | 3 | ||||
-rw-r--r-- | usr.sbin/ospfd/ospfe.c | 4 | ||||
-rw-r--r-- | usr.sbin/ospfd/ospfe.h | 3 |
4 files changed, 6 insertions, 16 deletions
diff --git a/usr.sbin/ospfd/interface.c b/usr.sbin/ospfd/interface.c index 9c021077fc8..cc3b24860c9 100644 --- a/usr.sbin/ospfd/interface.c +++ b/usr.sbin/ospfd/interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: interface.c,v 1.36 2005/10/12 09:25:57 claudio Exp $ */ +/* $OpenBSD: interface.c,v 1.37 2005/10/18 15:40:36 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -266,16 +266,6 @@ if_init(struct ospfd_conf *xconf, struct iface *iface) iface->fd = xconf->ospf_socket; } -int -if_shutdown(struct ospfd_conf *xconf) -{ - int ret = 0; - - ret = close(xconf->ospf_socket); - - return (ret); -} - /* timers */ void if_hello_timer(int fd, short event, void *arg) diff --git a/usr.sbin/ospfd/ospfd.c b/usr.sbin/ospfd/ospfd.c index 76fb186ca5b..8a5f938796f 100644 --- a/usr.sbin/ospfd/ospfd.c +++ b/usr.sbin/ospfd/ospfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfd.c,v 1.23 2005/08/15 18:58:47 norby Exp $ */ +/* $OpenBSD: ospfd.c,v 1.24 2005/10/18 15:40:36 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -260,7 +260,6 @@ ospfd_shutdown(void) control_cleanup(); kr_shutdown(); - if_shutdown(conf); do { if ((pid = wait(NULL)) == -1 && diff --git a/usr.sbin/ospfd/ospfe.c b/usr.sbin/ospfd/ospfe.c index 165538aa435..dcdde51e3c6 100644 --- a/usr.sbin/ospfd/ospfe.c +++ b/usr.sbin/ospfd/ospfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfe.c,v 1.31 2005/06/13 08:27:29 claudio Exp $ */ +/* $OpenBSD: ospfe.c,v 1.32 2005/10/18 15:40:36 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -206,6 +206,8 @@ ospfe_shutdown(void) area_del(area); } + close(oeconf->ospf_socket); + /* clean up */ msgbuf_write(&ibuf_rde->w); msgbuf_clear(&ibuf_rde->w); diff --git a/usr.sbin/ospfd/ospfe.h b/usr.sbin/ospfd/ospfe.h index d0b2506bb21..489a726528f 100644 --- a/usr.sbin/ospfd/ospfe.h +++ b/usr.sbin/ospfd/ospfe.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfe.h,v 1.15 2005/05/26 20:42:10 norby Exp $ */ +/* $OpenBSD: ospfe.h,v 1.16 2005/10/18 15:40:36 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -186,7 +186,6 @@ int if_fsm(struct iface *, enum iface_event); struct iface *if_new(struct kif *); int if_del(struct iface *); void if_init(struct ospfd_conf *, struct iface *); -int if_shutdown(struct ospfd_conf *); int if_act_start(struct iface *); int if_act_elect(struct iface *); |