diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-05-10 13:38:47 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-05-10 13:38:47 +0000 |
commit | 7e909e6776e8993236d2f62b2715c838a1b383ca (patch) | |
tree | db71c054b041ba3e9160b05e657dfa962665da10 /usr.sbin/bgpd/bgpd.c | |
parent | 539d426f7440af0a29dd269875bfff49df8c9a7e (diff) |
In bgpctl argument parser, re-arrange 'reason' parsing ('nei action [reason]')
to be more generic, then change 'reload' to take take a '[reason]' also,
which will be logged by bgpd.
ok kn claudio
Diffstat (limited to 'usr.sbin/bgpd/bgpd.c')
-rw-r--r-- | usr.sbin/bgpd/bgpd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c index e8836230326..ef2142f4fa0 100644 --- a/usr.sbin/bgpd/bgpd.c +++ b/usr.sbin/bgpd/bgpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.c,v 1.227 2019/10/02 08:58:34 claudio Exp $ */ +/* $OpenBSD: bgpd.c,v 1.228 2020/05/10 13:38:46 deraadt Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -829,6 +829,10 @@ dispatch_imsg(struct imsgbuf *ibuf, int idx, struct bgpd_config *conf) else { reconfig = 1; reconfpid = imsg.hdr.pid; + if (imsg.hdr.len == IMSG_HEADER_SIZE + REASON_LEN && + ((char *)imsg.data)[0]) + log_info("reload due to: %.*s", + REASON_LEN, log_reason(imsg.data)); } break; case IMSG_CTL_FIB_COUPLE: |