From 202e52731d228d96d85e9766910294d0f637e3ad Mon Sep 17 00:00:00 2001 From: tb Date: Tue, 28 Jun 2022 05:49:05 +0000 Subject: [PATCH] Unbreak tree: add log_policy() implementation missing from previous commit. --- usr.sbin/bgpd/util.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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) { -- 2.20.1