From: tb Date: Tue, 28 Jun 2022 05:49:05 +0000 (+0000) Subject: Unbreak tree: add log_policy() implementation missing from previous commit. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=202e52731d228d96d85e9766910294d0f637e3ad;p=openbsd Unbreak tree: add log_policy() implementation missing from previous commit. --- diff --git a/usr.sbin/bgpd/util.c b/usr.sbin/bgpd/util.c index 4cd33236933..b4bdd5c2fe9 100644 --- a/usr.sbin/bgpd/util.c +++ b/usr.sbin/bgpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.68 2022/06/24 10:36:53 claudio Exp $ */ +/* $OpenBSD: util.c,v 1.69 2022/06/28 05:49:05 tb Exp $ */ /* * Copyright (c) 2006 Claudio Jeker @@ -195,6 +195,25 @@ log_rtr_error(enum rtr_error err) } } +const char * +log_policy(uint8_t role) +{ + switch (role) { + case CAPA_ROLE_PROVIDER: + return "provider"; + case CAPA_ROLE_RS: + return "rs"; + case CAPA_ROLE_RS_CLIENT: + return "rs-client"; + case CAPA_ROLE_CUSTOMER: + return "customer"; + case CAPA_ROLE_PEER: + return "peer"; + default: + return "unknown"; + } +} + const char * aspath_delim(uint8_t seg_type, int closing) {