diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ospfd/kroute.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ospfd/kroute.c b/usr.sbin/ospfd/kroute.c index d35289d4d64..63889f1d8ce 100644 --- a/usr.sbin/ospfd/kroute.c +++ b/usr.sbin/ospfd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.83 2010/06/23 23:34:02 claudio Exp $ */ +/* $OpenBSD: kroute.c,v 1.84 2010/06/27 05:15:20 dlg Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -392,7 +392,8 @@ void kr_dispatch_msg(int fd, short event, void *bula) { /* XXX this is stupid */ - dispatch_rtmsg(); + if (dispatch_rtmsg() == -1) + event_loopexit(NULL); } void @@ -1454,8 +1455,7 @@ add: if ((kr = calloc(1, sizeof(struct kroute_node))) == NULL) { log_warn("dispatch calloc"); - rv = -1; - break; + return (-1); } kr->r.prefix.s_addr = prefix.s_addr; @@ -1472,7 +1472,7 @@ add: RTM_DELETE, &kr->r); free(kr); if (rv == -1) - break; + return (-1); } else { if ((label = (struct sockaddr_rtlabel *) rti_info[RTAX_LABEL]) != NULL) { |