summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ripd/rde.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2009-11-02 20:28:48 +0000
committerclaudio <claudio@openbsd.org>2009-11-02 20:28:48 +0000
commitdce97bdda5b6577f9af0c3ebe5af0adeb15a6445 (patch)
tree8da10ce4d804410aeb19d0da570a37349cba0f6a /usr.sbin/ripd/rde.c
parentAdd IMSG_CTL_LOG_VERBOSE similar to ospfd it allows to toggle debug logging. (diff)
downloadwireguard-openbsd-dce97bdda5b6577f9af0c3ebe5af0adeb15a6445.tar.xz
wireguard-openbsd-dce97bdda5b6577f9af0c3ebe5af0adeb15a6445.zip
Another routing daemon that gets IMSG_CTL_LOG_VERBOSE to allow toggeling of
log_debug(). ok michele, henning, sthen
Diffstat (limited to 'usr.sbin/ripd/rde.c')
-rw-r--r--usr.sbin/ripd/rde.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/ripd/rde.c b/usr.sbin/ripd/rde.c
index e24b6916556..f819d2e0d42 100644
--- a/usr.sbin/ripd/rde.c
+++ b/usr.sbin/ripd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.13 2009/09/18 16:17:02 michele Exp $ */
+/* $OpenBSD: rde.c,v 1.14 2009/11/02 20:28:49 claudio Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
@@ -189,7 +189,7 @@ rde_dispatch_imsg(int fd, short event, void *bula)
struct rip_route rr;
struct imsg imsg;
ssize_t n;
- int shut = 0;
+ int shut = 0, verbose;
if (event & EV_READ) {
if ((n = imsg_read(ibuf)) == -1)
@@ -258,6 +258,11 @@ rde_dispatch_imsg(int fd, short event, void *bula)
imsg.hdr.pid, -1, NULL, 0);
break;
+ case IMSG_CTL_LOG_VERBOSE:
+ /* already checked by ripe */
+ memcpy(&verbose, imsg.data, sizeof(verbose));
+ log_verbose(verbose);
+ break;
default:
log_debug("rde_dispatch_msg: unexpected imsg %d",
imsg.hdr.type);