]> git.puffer.fish Git - mirror/frr.git/commitdiff
nhrpd: NHRP_[ERR|WARN] -> EC_NHRP
authorQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 13 Sep 2018 18:59:07 +0000 (18:59 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 13 Sep 2018 18:59:07 +0000 (18:59 +0000)
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
nhrpd/nhrp_errors.c
nhrpd/nhrp_errors.h
nhrpd/resolver.c
nhrpd/vici.c

index c557ba8a6624137d4afda6e45cbeeb1debcae988..4c4f55be9ea3639c69f41e5fc7ee5c52acc5acab 100644 (file)
 /* clang-format off */
 static struct log_ref ferr_nhrp_err[] = {
        {
-               .code = NHRP_ERR_SWAN,
+               .code = EC_NHRP_SWAN,
                .title = "NHRP Strong Swan Error",
                .description = "NHRP has detected a error with the Strongswan code",
                .suggestion = "Ensure that StrongSwan is configured correctly.  Restart StrongSwan and FRR"
        },
        {
-               .code = NHRP_ERR_RESOLVER,
+               .code = EC_NHRP_RESOLVER,
                .title = "NHRP DNS Resolution",
                .description = "NHRP has detected an error in an attempt to resolve a hostname",
                .suggestion = "Ensure that DNS is working properly and the hostname is configured in dns.  If you are still seeing this error, open an issue"
index c9e947eb2ae9ffd792ae911f377dbe53e772d55e..593714786ab8b869a85312ec911639a737523033 100644 (file)
@@ -24,8 +24,8 @@
 #include "lib/ferr.h"
 
 enum nhrp_log_refs {
-       NHRP_ERR_SWAN = NHRP_FERR_START,
-       NHRP_ERR_RESOLVER,
+       EC_NHRP_SWAN = NHRP_FERR_START,
+       EC_NHRP_RESOLVER,
 };
 
 extern void nhrp_error_init(void);
index f017d974dfd5adf1358b69b088f68fb2aab38f20..4959ec91eea28c972a10e4698623a84114b96983 100644 (file)
@@ -198,7 +198,7 @@ void resolver_resolve(struct resolver_query *query, int af,
                                       union sockunion *))
 {
        if (query->callback != NULL) {
-               flog_err(NHRP_ERR_RESOLVER,
+               flog_err(EC_NHRP_RESOLVER,
                          "Trying to resolve '%s', but previous query was not finished yet",
                          hostname);
                return;
index c1a99685f39d6e34c61c57cd59c08b68b3aca277..0a1573b59dc728f803a5eccb08507da82b96ef4c 100644 (file)
@@ -218,7 +218,7 @@ static void parse_sa_message(struct vici_message_ctx *ctx,
                                        if (str2sockunion(buf,
                                                          &sactx->local.host)
                                            < 0)
-                                               flog_err(NHRP_ERR_SWAN,
+                                               flog_err(EC_NHRP_SWAN,
                                                          "VICI: bad strongSwan local-host: %s",
                                                          buf);
                        } else if (blob_equal(key, "local-id")
@@ -236,7 +236,7 @@ static void parse_sa_message(struct vici_message_ctx *ctx,
                                        if (str2sockunion(buf,
                                                          &sactx->remote.host)
                                            < 0)
-                                               flog_err(NHRP_ERR_SWAN,
+                                               flog_err(EC_NHRP_SWAN,
                                                          "VICI: bad strongSwan remote-host: %s",
                                                          buf);
                        } else if (blob_equal(key, "remote-id")
@@ -281,7 +281,7 @@ static void parse_cmd_response(struct vici_message_ctx *ctx,
        case VICI_KEY_VALUE:
                if (blob_equal(key, "errmsg")
                    && blob2buf(val, buf, sizeof(buf)))
-                       flog_err(NHRP_ERR_SWAN, "VICI: strongSwan: %s", buf);
+                       flog_err(EC_NHRP_SWAN, "VICI: strongSwan: %s", buf);
                break;
        default:
                break;
@@ -340,7 +340,7 @@ static void vici_recv_message(struct vici_conn *vici, struct zbuf *msg)
                break;
        case VICI_EVENT_UNKNOWN:
        case VICI_CMD_UNKNOWN:
-               flog_err(NHRP_ERR_SWAN,
+               flog_err(EC_NHRP_SWAN,
                        "VICI: StrongSwan does not support mandatory events (unpatched?)");
                break;
        case VICI_EVENT_CONFIRM: