]> git.proxmox.com Git - mirror_frr.git/blob - bgpd/bgp_errors.c
Merge pull request #2810 from chiragshah6/evpn_dev1
[mirror_frr.git] / bgpd / bgp_errors.c
1 /*
2 * BGP-specific error messages.
3 * Copyright (C) 2018 Cumulus Networks, Inc.
4 * Don Slice
5 *
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.
10 *
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.
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 */
20
21 #include <zebra.h>
22
23 #include "lib/ferr.h"
24 #include "bgp_errors.h"
25
26 /* clang-format off */
27 static struct log_ref ferr_bgp_err[] = {
28 {
29 .code = BGP_ERR_ATTR_FLAG,
30 .title = "BGP attribute flag is incorrect",
31 .description = "BGP attribute flag is set to the wrong value (Optional/Transitive/Partial)",
32 .suggestion = "Determine the soure of the attribute and determine why the attribute flag has been set incorrectly"
33 },
34 {
35 .code = BGP_ERR_ATTR_LEN,
36 .title = "BGP attribute length is incorrect",
37 .description = "BGP attribute length is incorrect",
38 .suggestion = "Determine the soure of the attribute and determine why the attribute length has been set incorrectly"
39 },
40 {
41 .code = BGP_ERR_ATTR_ORIGIN,
42 .title = "BGP attribute origin value invalid",
43 .description = "BGP attribute origin value is invalid",
44 .suggestion = "Determine the soure of the attribute and determine why the origin attribute has been set incorrectly"
45 },
46 {
47 .code = BGP_ERR_ATTR_MAL_AS_PATH,
48 .title = "BGP as path is invalid",
49 .description = "BGP as path has been malformed",
50 .suggestion = "Determine the soure of the update and determine why the as path has been set incorrectly"
51 },
52 {
53 .code = BGP_ERR_ATTR_FIRST_AS,
54 .title = "BGP as path first as is invalid",
55 .description = "BGP update has invalid first as in as path",
56 .suggestion = "Determine the soure of the update and determine why the as path first as value has been set incorrectly"
57 },
58 {
59 .code = BGP_ERR_ATTR_PMSI_TYPE,
60 .title = "BGP PMSI tunnel attribute type is invalid",
61 .description = "BGP update has invalid type for PMSI tunnel",
62 .suggestion = "Determine the soure of the update and determine why the PMSI tunnel attribute type has been set incorrectly"
63 },
64 {
65 .code = BGP_ERR_ATTR_PMSI_LEN,
66 .title = "BGP PMSI tunnel attribute length is invalid",
67 .description = "BGP update has invalid length for PMSI tunnel",
68 .suggestion = "Determine the soure of the update and determine why the PMSI tunnel attribute length has been set incorrectly"
69 },
70 {
71 .code = BGP_ERR_PEER_GROUP,
72 .title = "BGP peergroup operated on in error",
73 .description = "BGP operating on peer-group instead of peers included",
74 .suggestion = "Ensure the config doesn't contain peergroups contained within peergroups"
75 },
76 {
77 .code = BGP_ERR_PEER_DELETE,
78 .title = "BGP failed to delete peer structure",
79 .description = "BGP was unable to delete peer structure when address-family removed",
80 .suggestion = "Determine if all expected peers are removed and restart FRR if not. Most likely a bug"
81 },
82 {
83 .code = BGP_ERR_TABLE_CHUNK,
84 .title = "BGP failed to get table chunk memory",
85 .description = "BGP unable to get chunk memory for table manager",
86 .suggestion = "Ensure there is adequate memory on the device to support the table requirements"
87 },
88 {
89 .code = BGP_ERR_MACIP_LEN,
90 .title = "BGP received MACIP with invalid IP addr len",
91 .description = "BGP received MACIP with invalid IP addr len from Zebra",
92 .suggestion = "Verify MACIP entries inserted in Zebra are correct. Most likely a bug"
93 },
94 {
95 .code = BGP_ERR_LM_ERROR,
96 .title = "BGP received invalid label manager message",
97 .description = "BGP received invalid label manager message from label manager",
98 .suggestion = "Label manager sent invalid essage to BGP for wrong protocol, instance, etc. Most likely a bug"
99 },
100 {
101 .code = BGP_ERR_JSON_MEM_ERROR,
102 .title = "BGP unable to allocate memory for JSON output",
103 .description = "BGP attempted to generate JSON output and was unable to allocate the memory required",
104 .suggestion = "Ensure that the device has adequate memory to suport the required functions"
105 },
106 {
107 .code = BGP_ERR_UPDGRP_ATTR_LEN,
108 .title = "BGP update had attributes too long to send",
109 .description = "BGP attempted to send an update but the attributes were too long to fit",
110 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
111 },
112 {
113 .code = BGP_ERR_UPDGRP_CREATE,
114 .title = "BGP update group creation failed",
115 .description = "BGP attempted to create an update group but was unable to",
116 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
117 },
118 {
119 .code = BGP_ERR_UPDATE_SND,
120 .title = "BGP error creating update packet",
121 .description = "BGP attempted to create an update packet but was unable to",
122 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
123 },
124 {
125 .code = BGP_ERR_PKT_OPEN,
126 .title = "BGP error receiving open packet",
127 .description = "BGP received an open from a peer that was invalid",
128 .suggestion = "Determine the sending peer and correct his invalid open packet"
129 },
130 {
131 .code = BGP_ERR_SND_FAIL,
132 .title = "BGP error sending to peer",
133 .description = "BGP attempted to respond to open from a peer and failed",
134 .suggestion = "BGP attempted to respond to an open and could not sene the packet. Check local IP address for source"
135 },
136 {
137 .code = BGP_ERR_INVALID_STATUS,
138 .title = "BGP error receiving from peer",
139 .description = "BGP received an update from a peer but status was incorrect",
140 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
141 },
142 {
143 .code = BGP_ERR_UPDATE_RCV,
144 .title = "BGP error receiving update packet",
145 .description = "BGP received an invalid update packet",
146 .suggestion = "Determine the source of the update and resolve the invalid update being sent"
147 },
148 {
149 .code = BGP_ERR_NO_CAP,
150 .title = "BGP error due to capability not enabled",
151 .description = "BGP attempted a function that did not have the capability enabled",
152 .suggestion = "Enable the capability if this functionality is desired"
153 },
154 {
155 .code = BGP_ERR_NOTIFY_RCV,
156 .title = "BGP error receiving notify message",
157 .description = "BGP unable to process notification message",
158 .suggestion = "BGP notify received while in stopped state. If the problem persists, report for troubleshooting"
159 },
160 {
161 .code = BGP_ERR_KEEP_RCV,
162 .title = "BGP error receiving keepalive packet",
163 .description = "BGP unable to process keepalive packet",
164 .suggestion = "BGP keepalive received while in stopped state. If the problem persists, report for troubleshooting"
165 },
166 {
167 .code = BGP_ERR_RFSH_RCV,
168 .title = "BGP error receiving route refresh message",
169 .description = "BGP unable to process route refresh message",
170 .suggestion = "BGP route refresh received while in stopped state. If the problem persists, report for troubleshooting"},
171 {
172 .code = BGP_ERR_CAP_RCV,
173 .title = "BGP error capability message",
174 .description = "BGP unable to process received capability",
175 .suggestion = "BGP capability message received while in stopped state. If the problem persists, report for troubleshooting"
176 },
177 {
178 .code = BGP_ERR_NH_UPD,
179 .title = "BGP error with nexthopo update",
180 .description = "BGP unable to process nexthop update",
181 .suggestion = "BGP received nexthop update but nexthop is not reachable in this bgp instance. Report for troubleshooting"
182 },
183 {
184 .code = BGP_ERR_LABEL,
185 .title = "Failure to apply label",
186 .description = "BGP attempted to attempted to apply a label but could not",
187 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
188 },
189 {
190 .code = BGP_ERR_MULTIPATH,
191 .title = "Multipath specified is invalid",
192 .description = "BGP was started with an invalid ecmp/multipath value",
193 .suggestion = "Correct the ecmp/multipath value supplied when starting the BGP daemon"
194 },
195 {
196 .code = BGP_ERR_PKT_PROCESS,
197 .title = "Failure to process a packet",
198 .description = "BGP attempted to process a received packet but could not",
199 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
200 },
201 {
202 .code = BGP_ERR_CONNECT,
203 .title = "Failure to connect to peer",
204 .description = "BGP attempted to send open to peer but couldn't connect",
205 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
206 },
207 {
208 .code = BGP_ERR_FSM,
209 .title = "BGP FSM issue",
210 .description = "BGP neighbor transition problem",
211 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
212 },
213 {
214 .code = BGP_ERR_VNI,
215 .title = "BGP VNI creation issue",
216 .description = "BGP could not create a new VNI",
217 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
218 },
219 {
220 .code = BGP_ERR_NO_DFLT,
221 .title = "BGP default instance missing",
222 .description = "BGP could not find default instance",
223 .suggestion = "Define a default instance of BGP since some feature requires it's existence"
224 },
225 {
226 .code = BGP_ERR_VTEP_INVALID,
227 .title = "BGP remote VTEP invalid",
228 .description = "BGP remote VTEP is invalid and cannot be used",
229 .suggestion = "Correct remote VTEP configuration or resolve the source of the problem"
230 },
231 {
232 .code = BGP_ERR_ES_INVALID,
233 .title = "BGP ES route error",
234 .description = "BGP ES route incorrect, learned both local and remote",
235 .suggestion = "Correct configuration or addressing so that same not learned both local and remote"
236 },
237 {
238 .code = BGP_ERR_EVPN_ROUTE_DELETE,
239 .title = "BGP EVPN route delete error",
240 .description = "BGP attempted to delete an EVPN route and failed",
241 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
242 },
243 {
244 .code = BGP_ERR_EVPN_FAIL,
245 .title = "BGP EVPN install/uninstall error",
246 .description = "BGP attempted to install or uninstall an EVPN prefix and failed",
247 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
248 },
249 {
250 .code = BGP_ERR_EVPN_ROUTE_INVALID,
251 .title = "BGP EVPN route received with invalid contents",
252 .description = "BGP received an EVPN route with invalid contents",
253 .suggestion = "Determine the source of the EVPN route and resolve whatever is causing invalid contents"
254 },
255 {
256 .code = BGP_ERR_EVPN_ROUTE_CREATE,
257 .title = "BGP EVPN route create error",
258 .description = "BGP attempted to create an EVPN route and failed",
259 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
260 },
261 {
262 .code = BGP_ERR_ES_CREATE,
263 .title = "BGP EVPN ES entry create error",
264 .description = "BGP attempted to create an EVPN ES entry and failed",
265 .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
266 },
267 {
268 .code = BGP_ERR_MULTI_INSTANCE,
269 .title = "BGP config multi-instance issue",
270 .description = "BGP configuration attempting multiple instances without enabling the feature",
271 .suggestion = "Correct the configuration so that bgp multiple-instance is enabled if desired"
272 },
273 {
274 .code = BGP_ERR_EVPN_AS_MISMATCH,
275 .title = "BGP AS configuration issue",
276 .description = "BGP configuration attempted for a different AS than currently configured",
277 .suggestion = "Correct the configuration so that the correct BGP AS number is used"
278 },
279 {
280 .code = BGP_ERR_EVPN_INSTANCE_MISMATCH,
281 .title = "BGP EVPN AS and process name mismatch",
282 .description = "BGP configuration has AS and process name mismatch",
283 .suggestion = "Correct the configuration so that the BGP AS number and instance name are consistent"
284 },
285 {
286 .code = BGP_ERR_FLOWSPEC_PACKET,
287 .title = "BGP Flowspec packet processing error",
288 .description = "The BGP flowspec subsystem has detected a error in the send or receive of a packet",
289 .suggestion = "Gather log files from both sides of the peering relationship and open an issue"
290 },
291 {
292 .code = BGP_ERR_FLOWSPEC_INSTALLATION,
293 .title = "BGP Flowspec Installation/removal Error",
294 .description = "The BGP flowspec subsystem has detected that there was a failure for installation/removal/modification of Flowspec from the dataplane",
295 .suggestion = "Gather log files from the router and open an issue, Restart FRR"
296 },
297 {
298 .code = END_FERR,
299 }
300 };
301 /* clang-format on */
302
303 void bgp_error_init(void)
304 {
305 log_ref_add(ferr_bgp_err);
306 }