+// SPDX-License-Identifier: ISC
/* $OpenBSD$ */
/*
* Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org>
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <zebra.h>
#include "libfrr.h"
static void lde_shutdown(void);
-static int lde_dispatch_imsg(struct thread *);
-static int lde_dispatch_parent(struct thread *);
+static void lde_dispatch_imsg(struct thread *thread);
+static void lde_dispatch_parent(struct thread *thread);
static __inline int lde_nbr_compare(const struct lde_nbr *,
const struct lde_nbr *);
static struct lde_nbr *lde_nbr_new(uint32_t, struct lde_nbr *);
}
/* ARGSUSED */
-static int
-lde_dispatch_imsg(struct thread *thread)
+static void lde_dispatch_imsg(struct thread *thread)
{
struct imsgev *iev = THREAD_ARG(thread);
struct imsgbuf *ibuf = &iev->ibuf;
imsg_event_add(iev);
else {
/* this pipe is dead, so remove the event handlers and exit */
- thread_cancel(&iev->ev_read);
- thread_cancel(&iev->ev_write);
+ THREAD_OFF(iev->ev_read);
+ THREAD_OFF(iev->ev_write);
lde_shutdown();
}
-
- return (0);
}
/* ARGSUSED */
-static int
-lde_dispatch_parent(struct thread *thread)
+static void lde_dispatch_parent(struct thread *thread)
{
static struct ldpd_conf *nconf;
struct iface *iface, *niface;
imsg_event_add(iev);
else {
/* this pipe is dead, so remove the event handlers and exit */
- thread_cancel(&iev->ev_read);
- thread_cancel(&iev->ev_write);
+ THREAD_OFF(iev->ev_read);
+ THREAD_OFF(iev->ev_write);
lde_shutdown();
}
-
- return (0);
}
int
fn->fec.u.ipv6.prefixlen) != FILTER_PERMIT)
return (NO_LABEL);
break;
- default:
+ case FEC_TYPE_PWID:
break;
}
fn->fec.u.ipv6.prefixlen) != FILTER_PERMIT)
return (MPLS_LABEL_IMPLICIT_NULL);
return MPLS_LABEL_IPV6_EXPLICIT_NULL;
- default:
+ case FEC_TYPE_PWID:
break;
}
}
prefix->u.prefix6 = fec->u.ipv6.prefix;
prefix->prefixlen = fec->u.ipv6.prefixlen;
break;
- default:
+ case FEC_TYPE_PWID:
prefix->family = AF_UNSPEC;
break;
}
if (!ln->v6_enabled)
return;
break;
- default:
+ case FEC_TYPE_PWID:
fatalx("lde_send_labelrequest: unknown af");
}
} else
if (lde_addr->af != AF_INET6)
continue;
break;
- default:
+ case FEC_TYPE_PWID:
continue;
}
/*
* Event callback used to retry the label-manager sync zapi session.
*/
-static int zclient_sync_retry(struct thread *thread)
+static void zclient_sync_retry(struct thread *thread)
{
zclient_sync_init();
-
- return 0;
}
/*