]> git.proxmox.com Git - mirror_frr.git/blame - ospfd/ospf_errors.c
lib: Convert ospf_opaque.c to use the err-card system
[mirror_frr.git] / ospfd / ospf_errors.c
CommitLineData
313d7993 1/*
247dcce2 2 * OSPF-specific error messages.
313d7993 3 * Copyright (C) 2018 Cumulus Networks, Inc.
247dcce2 4 * Chirag Shah
313d7993 5 *
247dcce2
QY
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)
9 * any later version.
313d7993 10 *
247dcce2
QY
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
313d7993
CS
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
247dcce2 20
313d7993 21#include <zebra.h>
247dcce2
QY
22
23#include "lib/ferr.h"
313d7993
CS
24#include "ospf_errors.h"
25
c9cc11f6 26/* clang-format off */
45301f8c
DS
27static struct log_ref ferr_ospf_warn[] = {
28 {
29 .code = OSPF_WARN_SET_METRIC_PLUS,
30 .title = "OSPF does not support `set metric +rtt/-rtt`",
31 .description = "This implementation of OSPF does not currently support `set metric +rtt/-rtt`",
32 .suggestion = "Do not use this particular set command for an ospf route-map",
33 },
c9cc11f6
DS
34 {
35 .code = OSPF_WARN_MD5,
36 .title = "OSPF has noticed a MD5 issue",
37 .description = "Something has gone wrong with the calculation of the MD5 data",
38 .suggestion = "Ensure your key is correct, gather log data from this side as well as peer and open an Issue",
39 },
40 {
41 .code = OSPF_WARN_PACKET,
42 .title = "OSPF has detected packet information missmatch",
43 .description = "OSPF has detected that packet information received is incorrect",
44 .suggestion = "Ensure interface configuration is correct, gather log files from here and the peer and open an Issue",
45 },
46 {
47 .code = OSPF_WARN_LARGE_LSA,
48 .title = "OSPF has determined that a LSA packet will be too large",
49 .description = "OSPF has received data that is causing it to recalculate how large packets should be and has discovered that the packet size needed would be too large and we will need to fragment packets",
50 .suggestion = "Further divide up your network with areas",
51 },
34f74c7a
DS
52 {
53 .code = OSPF_WARN_LSA_UNEXPECTED,
54 .title = "OSPF has received a LSA-type that it was not expecting",
55 .description = "OSPF has received a LSA-type that it was not expecting during processing",
56 .suggestion = "Gather log data from this machine and it's peer and open an Issue",
57 },
58 {
59 .code = OSPF_WARN_LSA,
60 .title = "OSPF has discovered inconsistent internal state for a LSA",
61 .description = "During handling of a LSA, OSPF has discovered that the LSA's internal state is inconsistent",
62 .suggestion = "Gather log data and open an Issue",
63 },
45301f8c
DS
64 {
65 .code = END_FERR,
66 }
67};
68
85cd2f9f 69static struct log_ref ferr_ospf_err[] = {
313d7993
CS
70 {
71 .code = OSPF_ERR_PKT_PROCESS,
72 .title = "Failure to process a packet",
73 .description = "OSPF attempted to process a received packet but could not",
74 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
75 },
76 {
77 .code = OSPF_ERR_ROUTER_LSA_MISMATCH,
78 .title = "Failure to process Router LSA",
5e1e0166 79 .description = "OSPF attempted to process a Router LSA but Advertising ID mismatch with link id",
313d7993
CS
80 .suggestion = "Check OSPF network config for any config issue, If the problem persists, report the problem for troubleshooting"
81 },
82 {
83 .code = OSPF_ERR_DOMAIN_CORRUPT,
84 .title = "OSPF Domain Corruption",
5e1e0166
QY
85 .description = "OSPF attempted to process a Router LSA but Advertising ID mismatch with link id",
86 .suggestion = "Check OSPF network Database for corrupted LSA, If the problem persists, shutdown OSPF domain and report the problem for troubleshooting"
313d7993
CS
87 },
88 {
89 .code = OSPF_ERR_INIT_FAIL,
90 .title = "OSPF Initialization failure",
5e1e0166 91 .description = "OSPF failed to initialized OSPF default insance",
313d7993
CS
92 .suggestion = "Ensure there is adequate memory on the device. If the problem persists, report the problem for troubleshooting"
93 },
94 {
95 .code = OSPF_ERR_SR_INVALID_DB,
96 .title = "OSPF SR Invalid DB",
97 .description = "OSPF Segment Routing Database is invalid",
98 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
99 },
100 {
101 .code = OSPF_ERR_SR_NODE_CREATE,
102 .title = "OSPF SR hash node creation failed",
103 .description = "OSPF Segment Routing node creation failed",
104 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
105 },
106 {
107 .code = OSPF_ERR_SR_INVALID_LSA_ID,
5e1e0166 108 .title = "OSPF SR Invalid LSA ID",
313d7993 109 .description = "OSPF Segment Routing invalid lsa id",
5e1e0166 110 .suggestion = "Restart OSPF instance, If the problem persists, report the problem for troubleshooting"
313d7993
CS
111 },
112 {
113 .code = OSPF_ERR_SR_INVALID_ALGORITHM,
114 .title = "OSPF SR Invalid Algorithm",
115 .description = "OSPF Segment Routing invalid Algorithm",
116 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
117 },
313d7993
CS
118 {
119 .code = END_FERR,
120 }
121};
34f74c7a 122/* clang-format on */
313d7993
CS
123
124void ospf_error_init(void)
125{
45301f8c 126 log_ref_add(ferr_ospf_warn);
85cd2f9f 127 log_ref_add(ferr_ospf_err);
313d7993 128}