diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-11-02 20:38:16 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-11-02 20:38:16 +0000 |
commit | d4634e25b09562de3e880667f1cb192c2b92df6d (patch) | |
tree | 0e1234b1027c6beddb16ce8d7ba893aadc5d48ee /usr.sbin/bgpd/bgpd.c | |
parent | c2fb2e6439d9d6ad1aafc59781609220efc3b197 (diff) |
Implement IMSG_CTL_LOG_VERBOSE similar to ospfd. Even though bgpd has almost
no log_debug() it makes more sense to make all routing daemons behave the same.
Diffstat (limited to 'usr.sbin/bgpd/bgpd.c')
-rw-r--r-- | usr.sbin/bgpd/bgpd.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c index 048e0c3d5f0..b92085737c9 100644 --- a/usr.sbin/bgpd/bgpd.c +++ b/usr.sbin/bgpd/bgpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.c,v 1.149 2009/07/20 15:00:13 claudio Exp $ */ +/* $OpenBSD: bgpd.c,v 1.150 2009/11/02 20:38:15 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -158,6 +158,7 @@ main(int argc, char *argv[]) if (conf.opts & BGPD_OPT_VERBOSE) conf.opts |= BGPD_OPT_VERBOSE2; conf.opts |= BGPD_OPT_VERBOSE; + log_verbose(1); break; case 'r': conf.rcsock = optarg; @@ -554,8 +555,8 @@ int dispatch_imsg(struct imsgbuf *ibuf, int idx) { struct imsg imsg; - int n; - int rv; + ssize_t n; + int rv, verbose; if ((n = imsg_read(ibuf)) == -1) return (-1); @@ -696,6 +697,11 @@ dispatch_imsg(struct imsgbuf *ibuf, int idx) carp_demote_set(msg->demote_group, msg->level); } break; + case IMSG_CTL_LOG_VERBOSE: + /* already checked by SE */ + memcpy(&verbose, imsg.data, sizeof(verbose)); + log_verbose(verbose); + break; default: break; } |