]> git.proxmox.com Git - mirror_frr.git/blame - ospfd/ospf_errors.c
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
[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 {
cf444bcf 29 .code = EC_OSPF_SET_METRIC_PLUS,
45301f8c
DS
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 34 {
cf444bcf 35 .code = EC_OSPF_MD5,
c9cc11f6
DS
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 {
cf444bcf 41 .code = EC_OSPF_PACKET,
c9cc11f6
DS
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 {
cf444bcf 47 .code = EC_OSPF_LARGE_LSA,
c9cc11f6
DS
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 52 {
cf444bcf 53 .code = EC_OSPF_LSA_UNEXPECTED,
34f74c7a
DS
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 {
cf444bcf 59 .code = EC_OSPF_LSA,
34f74c7a
DS
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 },
85c9b439 64 {
cf444bcf 65 .code = EC_OSPF_OPAQUE_REGISTRATION,
85c9b439
DS
66 .title = "OSPF has failed to properly register Opaque Handler",
67 .description = "During initialization OSPF has detected a failure to install an opaque handler",
68 .suggestion = "Gather log data and open an Issue",
69 },
2c72cf2a 70 {
cf444bcf 71 .code = EC_OSPF_TE_UNEXPECTED,
2c72cf2a
DS
72 .title = "OSPF has received TE information that it was not expecting",
73 .description = "OSPF has received TE information that it was not expecting during normal processing of data",
542a208f
DS
74 .suggestion = "Gather log data from this machine and it's peer and open an Issue",
75 },
76 {
cf444bcf 77 .code = EC_OSPF_LSA_INSTALL_FAILURE,
542a208f
DS
78 .title = "OSPF was unable to save the LSA into it's database",
79 .description = "During processing of a new lsa and attempting to save the lsa into the OSPF database, this process failed.",
80 .suggestion = "Gather log data from this machine and open an Issue",
2c72cf2a 81 },
89f60109 82 {
cf444bcf 83 .code = EC_OSPF_LSA_NULL,
89f60109
DS
84 .title = "OSPF has received a NULL lsa pointer",
85 .description = "When processing a LSA update we have found and noticed an internal error where we are passing around a NULL pointer",
86 .suggestion = "Gather data from this machine and it's peer and open an Issue",
87 },
88 {
cf444bcf 89 .code = EC_OSPF_EXT_LSA_UNEXPECTED,
89f60109
DS
90 .title = "OSPF has received EXT information that leaves it in an unexpected state",
91 .description = "While processing EXT LSA information, OSPF has noticed that the internal state of OSPF has gotten inconsistent",
92 .suggestion = "Gather data from this machine and it's peer and open an Issue",
93 },
733fb917 94 {
cf444bcf 95 .code = EC_OSPF_LSA_MISSING,
733fb917
DS
96 .title = "OSPF attempted to look up a LSA and it was not found",
97 .description = "During processing of new LSA information, we attempted to look up an old LSA and it was not found",
98 .suggestion = "Gather data from this machine and open an Issue",
99 },
13ab4921 100 {
cf444bcf 101 .code = EC_OSPF_PTP_NEIGHBOR,
13ab4921
DS
102 .title = "OSPF has detected more than 1 neighbor on a P2P interface",
103 .description = "If you configure a ospf interface as P2P we should not detect more than one neighbor on the interface",
104 .suggestion = "Fix your config",
105 },
106 {
cf444bcf 107 .code = EC_OSPF_LSA_SIZE,
13ab4921
DS
108 .title = "OSPF has detected an invalid LSA size",
109 .description = "OSPF has detected a state where we are attempting to grow a LSA but the LSA has reached it's maximum size",
110 .suggestion = "Gather data and open an Issue",
111 },
45301f8c
DS
112 {
113 .code = END_FERR,
114 }
115};
116
85cd2f9f 117static struct log_ref ferr_ospf_err[] = {
313d7993 118 {
cf444bcf 119 .code = EC_OSPF_PKT_PROCESS,
313d7993
CS
120 .title = "Failure to process a packet",
121 .description = "OSPF attempted to process a received packet but could not",
122 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
123 },
124 {
cf444bcf 125 .code = EC_OSPF_ROUTER_LSA_MISMATCH,
313d7993 126 .title = "Failure to process Router LSA",
5e1e0166 127 .description = "OSPF attempted to process a Router LSA but Advertising ID mismatch with link id",
313d7993
CS
128 .suggestion = "Check OSPF network config for any config issue, If the problem persists, report the problem for troubleshooting"
129 },
130 {
cf444bcf 131 .code = EC_OSPF_DOMAIN_CORRUPT,
313d7993 132 .title = "OSPF Domain Corruption",
5e1e0166
QY
133 .description = "OSPF attempted to process a Router LSA but Advertising ID mismatch with link id",
134 .suggestion = "Check OSPF network Database for corrupted LSA, If the problem persists, shutdown OSPF domain and report the problem for troubleshooting"
313d7993
CS
135 },
136 {
cf444bcf 137 .code = EC_OSPF_INIT_FAIL,
313d7993 138 .title = "OSPF Initialization failure",
5e1e0166 139 .description = "OSPF failed to initialized OSPF default insance",
313d7993
CS
140 .suggestion = "Ensure there is adequate memory on the device. If the problem persists, report the problem for troubleshooting"
141 },
142 {
cf444bcf 143 .code = EC_OSPF_SR_INVALID_DB,
313d7993
CS
144 .title = "OSPF SR Invalid DB",
145 .description = "OSPF Segment Routing Database is invalid",
146 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
147 },
148 {
cf444bcf 149 .code = EC_OSPF_SR_NODE_CREATE,
313d7993
CS
150 .title = "OSPF SR hash node creation failed",
151 .description = "OSPF Segment Routing node creation failed",
152 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
153 },
154 {
cf444bcf 155 .code = EC_OSPF_SR_INVALID_LSA_ID,
5e1e0166 156 .title = "OSPF SR Invalid LSA ID",
313d7993 157 .description = "OSPF Segment Routing invalid lsa id",
5e1e0166 158 .suggestion = "Restart OSPF instance, If the problem persists, report the problem for troubleshooting"
313d7993
CS
159 },
160 {
cf444bcf 161 .code = EC_OSPF_INVALID_ALGORITHM,
313d7993
CS
162 .title = "OSPF SR Invalid Algorithm",
163 .description = "OSPF Segment Routing invalid Algorithm",
164 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
165 },
14c5ef90 166 {
cf444bcf 167 .code = EC_OSPF_FSM_INVALID_STATE,
14c5ef90
DS
168 .title = "OSPF FSM invalid state detected",
169 .description = "OSPF has attempted to change states when it should not be able to",
170 .suggestion = "Gather log files and open an issue",
171 },
313d7993
CS
172 {
173 .code = END_FERR,
174 }
175};
34f74c7a 176/* clang-format on */
313d7993
CS
177
178void ospf_error_init(void)
179{
45301f8c 180 log_ref_add(ferr_ospf_warn);
85cd2f9f 181 log_ref_add(ferr_ospf_err);
313d7993 182}