2 * BGP-specific error messages.
3 * Copyright (C) 2018 Cumulus Networks, Inc.
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)
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
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
24 #include "bgp_errors.h"
26 /* clang-format off */
27 static struct log_ref ferr_bgp_warn
[] = {
29 .code
= BGP_WARN_ASPATH_FEWER_HOPS
,
30 .title
= "BGP AS-path conversion has failed",
31 .description
= "BGP has attempted to convert a AS2 to AS4 path and has failed",
32 .suggestion
= "Open an Issue with all relevant log files and restart FRR"
35 .code
= BGP_WARN_DEFUNCT_SNPA_LEN
,
36 .title
= "BGP has received a value in a reserved field",
37 .description
= "BGP has received a non-zero value in a reserved field that was used for SNPA-length at one point in time",
38 .suggestion
= "BGP has peered with either a router that is attempting to send SNPA data or it has received a corrupted packet. If we are peering with a SNPA aware router(unlikely) upgrade that router, else open an Issue after gathering relevant log files",
41 .code
= BGP_WARN_MISSING_ATTRIBUTE
,
42 .title
= "BGP has received an update with missing a missing attribute",
43 .description
= "BGP received update packets must have some minimum attribute information within them",
44 .suggestion
= "Gather log data from this and remote peer and open an Issue with this data",
47 .code
= BGP_WARN_ATTRIBUTE_TOO_SMALL
,
48 .title
= "BGP udate packet with attribute data that is too small",
49 .description
= "BGP has received an update packet that is too small to parse a given attribute. This typically means that something has gone wrong between us and the remote peer",
50 .suggestion
= "Gather log data from this and remote peer and open an Issue with this data",
53 .code
= BGP_WARN_EXT_ATTRIBUTE_TOO_SMALL
,
54 .title
= "BGP udate packet with extended attribute data that is too small",
55 .description
= "BGP has received an update packet that is too small to parse a given extended attribute. This typically means that something has gone wrong between us and the remote peer",
56 .suggestion
= "Gather log data from this and remote peer and open an Issue with this data",
59 .code
= BGP_WARN_ATTRIBUTE_REPEATED
,
60 .title
= "BGP update packet received with a repeated attribute",
61 .description
= "BGP has received an update packet with a attribute that is repeated more than one time for a particular route. This typically means that something has gone wrong between us and the remote peer",
62 .suggestion
= "Gather log data from this and remote peer and open an Issue with this data",
65 .code
= BGP_WARN_ATTRIBUTE_TOO_LARGE
,
66 .title
= "BGP udate packet with attribute data that is too large",
67 .description
= "BGP has received an update packet that has too much data in a particular attribute. This typically means that something has gone wrong between us and the remote peer",
68 .suggestion
= "Gather log data from this and remote peer and open an Issue with this data",
71 .code
= BGP_WARN_ATTRIBUTE_PARSE_ERROR
,
72 .title
= "BGP update packet with attribute data has a parse error, specific to the attribute",
73 .description
= "BGP has received an update packet with an attribute that when parsed does not make sense in some manner",
74 .suggestion
= "Gather log data from this and remote peer and open an Issue with this data",
77 .code
= BGP_WARN_ATTRIBUTE_PARSE_WITHDRAW
,
78 .title
= "BGP update packet with a broken optional attribute has caused a withdraw of associated routes",
79 .description
= "BGP has received a update packet with optional attributes that did not parse correctly, instead of resetting the peer, withdraw associated routes and note that this has happened",
80 .suggestion
= "Gather log data from this and remote peer and open an Issue with this data",
83 .code
= BGP_WARN_ATTRIBUTE_FETCH_ERROR
,
84 .title
= "BGP update packet with a broken length",
85 .description
= "BGP has received a update packet with an attribute that has an incorrect length",
86 .suggestion
= "Gather log data from this and remote peer and open an Issue with this data",
89 .code
= BGP_WARN_ATTRIBUTES_MISMATCH
,
90 .title
= "BGP update packet with a length different than attribute data length",
91 .description
= "BGP has received a update packet with attributes that when parsed do not correctly add up to packet data length",
92 .suggestion
= "Gather log data from this and remote peer and open an Issue with this data",
95 .code
= BGP_WARN_DUMP
,
96 .title
= "BGP MRT dump subsystem has encountered an issue",
97 .description
= "BGP has found that the attempted write of MRT data to a dump file has failed",
98 .suggestion
= "Ensure BGP has permissions to write the specified file",
101 .code
= BGP_WARN_UPDATE_PACKET_SHORT
,
102 .title
= "BGP Update Packet is to Small",
103 .description
= "The update packet received from a peer is to small",
104 .suggestion
= "Determine the source of the update packet and examine that peer for what has gone wrong",
107 .code
= BGP_WARN_UPDATE_PACKET_LONG
,
108 .title
= "BGP Update Packet is to large",
109 .description
= "The update packet received from a peer is to large",
110 .suggestion
= "Determine the source of the update packet and examine that peer for what has gone wrong",
113 .code
= BGP_WARN_UNRECOGNIZED_CAPABILITY
,
114 .title
= "Unknown BGP Capability Received",
115 .description
= "The negotiation of capabilities has received a capability that we do not know what to do with",
116 .suggestion
= "Determine the source of the capability and remove the capability from what is sent",
119 .code
= BGP_WARN_NO_TCP_MD5
,
120 .title
= "Unable to set TCP MD5 option on socket",
121 .description
= "BGP attempted to setup TCP MD5 configuration on the socket as per configuration but was unable to",
122 .suggestion
= "Please collect log files and open Issue",
125 .code
= BGP_WARN_NO_SOCKOPT_MARK
,
126 .title
= "Unable to set socket MARK option",
127 .description
= "BGP attempted to set the SO_MARK option for a socket and was unable to do so",
128 .suggestion
= "Please collect log files and open Issue",
131 .code
= BGP_WARN_EVPN_PMSI_PRESENT
,
132 .title
= "BGP Received a EVPN NLRI with PMSI included",
133 .description
= "BGP has received a type-3 NLRI with PMSI information. At this time FRR is not capable of properly handling this NLRI type",
134 .suggestion
= "Setup peer to not send this type of data to FRR"
137 .code
= BGP_WARN_EVPN_VPN_VNI
,
138 .title
= "BGP has received a local macip and cannot properly handle it",
139 .description
= "BGP has received a local macip from zebra and has no way to properly handle the macip because the vni is not setup properly",
140 .suggestion
= "Ensure proper setup of BGP EVPN",
143 .code
= BGP_WARN_EVPN_ESI
,
144 .title
= "BGP has received a local ESI for deletion",
145 .description
= "BGP has received a local ESI for deletion but when attempting to find the stored data internally was unable to find the information for deletion",
146 .suggestion
= "Gather logging and open an Issue",
149 .code
= BGP_WARN_INVALID_LABEL_STACK
,
150 .title
= "BGP has received a label stack in a NLRI that does not have the BOS marked",
151 .description
= "BGP when it receives a NLRI with a label stack should have the BOS marked, this received packet does not have this",
152 .suggestion
= "Gather log information from here and remote peer and open an Issue",
159 static struct log_ref ferr_bgp_err
[] = {
161 .code
= BGP_ERR_ATTR_FLAG
,
162 .title
= "BGP attribute flag is incorrect",
163 .description
= "BGP attribute flag is set to the wrong value (Optional/Transitive/Partial)",
164 .suggestion
= "Determine the soure of the attribute and determine why the attribute flag has been set incorrectly"
167 .code
= BGP_ERR_ATTR_LEN
,
168 .title
= "BGP attribute length is incorrect",
169 .description
= "BGP attribute length is incorrect",
170 .suggestion
= "Determine the soure of the attribute and determine why the attribute length has been set incorrectly"
173 .code
= BGP_ERR_ATTR_ORIGIN
,
174 .title
= "BGP attribute origin value invalid",
175 .description
= "BGP attribute origin value is invalid",
176 .suggestion
= "Determine the soure of the attribute and determine why the origin attribute has been set incorrectly"
179 .code
= BGP_ERR_ATTR_MAL_AS_PATH
,
180 .title
= "BGP as path is invalid",
181 .description
= "BGP as path has been malformed",
182 .suggestion
= "Determine the soure of the update and determine why the as path has been set incorrectly"
185 .code
= BGP_ERR_ATTR_FIRST_AS
,
186 .title
= "BGP as path first as is invalid",
187 .description
= "BGP update has invalid first as in as path",
188 .suggestion
= "Determine the soure of the update and determine why the as path first as value has been set incorrectly"
191 .code
= BGP_ERR_ATTR_PMSI_TYPE
,
192 .title
= "BGP PMSI tunnel attribute type is invalid",
193 .description
= "BGP update has invalid type for PMSI tunnel",
194 .suggestion
= "Determine the soure of the update and determine why the PMSI tunnel attribute type has been set incorrectly"
197 .code
= BGP_ERR_ATTR_PMSI_LEN
,
198 .title
= "BGP PMSI tunnel attribute length is invalid",
199 .description
= "BGP update has invalid length for PMSI tunnel",
200 .suggestion
= "Determine the soure of the update and determine why the PMSI tunnel attribute length has been set incorrectly"
203 .code
= BGP_ERR_PEER_GROUP
,
204 .title
= "BGP peergroup operated on in error",
205 .description
= "BGP operating on peer-group instead of peers included",
206 .suggestion
= "Ensure the config doesn't contain peergroups contained within peergroups"
209 .code
= BGP_ERR_PEER_DELETE
,
210 .title
= "BGP failed to delete peer structure",
211 .description
= "BGP was unable to delete peer structure when address-family removed",
212 .suggestion
= "Determine if all expected peers are removed and restart FRR if not. Most likely a bug"
215 .code
= BGP_ERR_TABLE_CHUNK
,
216 .title
= "BGP failed to get table chunk memory",
217 .description
= "BGP unable to get chunk memory for table manager",
218 .suggestion
= "Ensure there is adequate memory on the device to support the table requirements"
221 .code
= BGP_ERR_MACIP_LEN
,
222 .title
= "BGP received MACIP with invalid IP addr len",
223 .description
= "BGP received MACIP with invalid IP addr len from Zebra",
224 .suggestion
= "Verify MACIP entries inserted in Zebra are correct. Most likely a bug"
227 .code
= BGP_ERR_LM_ERROR
,
228 .title
= "BGP received invalid label manager message",
229 .description
= "BGP received invalid label manager message from label manager",
230 .suggestion
= "Label manager sent invalid essage to BGP for wrong protocol, instance, etc. Most likely a bug"
233 .code
= BGP_ERR_JSON_MEM_ERROR
,
234 .title
= "BGP unable to allocate memory for JSON output",
235 .description
= "BGP attempted to generate JSON output and was unable to allocate the memory required",
236 .suggestion
= "Ensure that the device has adequate memory to suport the required functions"
239 .code
= BGP_ERR_UPDGRP_ATTR_LEN
,
240 .title
= "BGP update had attributes too long to send",
241 .description
= "BGP attempted to send an update but the attributes were too long to fit",
242 .suggestion
= "Most likely a bug. If the problem persists, report the problem for troubleshooting"
245 .code
= BGP_ERR_UPDGRP_CREATE
,
246 .title
= "BGP update group creation failed",
247 .description
= "BGP attempted to create an update group but was unable to",
248 .suggestion
= "Most likely a bug. If the problem persists, report the problem for troubleshooting"
251 .code
= BGP_ERR_UPDATE_SND
,
252 .title
= "BGP error creating update packet",
253 .description
= "BGP attempted to create an update packet but was unable to",
254 .suggestion
= "Most likely a bug. If the problem persists, report the problem for troubleshooting"
257 .code
= BGP_ERR_PKT_OPEN
,
258 .title
= "BGP error receiving open packet",
259 .description
= "BGP received an open from a peer that was invalid",
260 .suggestion
= "Determine the sending peer and correct his invalid open packet"
263 .code
= BGP_ERR_SND_FAIL
,
264 .title
= "BGP error sending to peer",
265 .description
= "BGP attempted to respond to open from a peer and failed",
266 .suggestion
= "BGP attempted to respond to an open and could not sene the packet. Check local IP address for source"
269 .code
= BGP_ERR_INVALID_STATUS
,
270 .title
= "BGP error receiving from peer",
271 .description
= "BGP received an update from a peer but status was incorrect",
272 .suggestion
= "Most likely a bug. If the problem persists, report the problem for troubleshooting"
275 .code
= BGP_ERR_UPDATE_RCV
,
276 .title
= "BGP error receiving update packet",
277 .description
= "BGP received an invalid update packet",
278 .suggestion
= "Determine the source of the update and resolve the invalid update being sent"
281 .code
= BGP_ERR_NO_CAP
,
282 .title
= "BGP error due to capability not enabled",
283 .description
= "BGP attempted a function that did not have the capability enabled",
284 .suggestion
= "Enable the capability if this functionality is desired"
287 .code
= BGP_ERR_NOTIFY_RCV
,
288 .title
= "BGP error receiving notify message",
289 .description
= "BGP unable to process notification message",
290 .suggestion
= "BGP notify received while in stopped state. If the problem persists, report for troubleshooting"
293 .code
= BGP_ERR_KEEP_RCV
,
294 .title
= "BGP error receiving keepalive packet",
295 .description
= "BGP unable to process keepalive packet",
296 .suggestion
= "BGP keepalive received while in stopped state. If the problem persists, report for troubleshooting"
299 .code
= BGP_ERR_RFSH_RCV
,
300 .title
= "BGP error receiving route refresh message",
301 .description
= "BGP unable to process route refresh message",
302 .suggestion
= "BGP route refresh received while in stopped state. If the problem persists, report for troubleshooting"},
304 .code
= BGP_ERR_CAP_RCV
,
305 .title
= "BGP error capability message",
306 .description
= "BGP unable to process received capability",
307 .suggestion
= "BGP capability message received while in stopped state. If the problem persists, report for troubleshooting"
310 .code
= BGP_ERR_NH_UPD
,
311 .title
= "BGP error with nexthopo update",
312 .description
= "BGP unable to process nexthop update",
313 .suggestion
= "BGP received nexthop update but nexthop is not reachable in this bgp instance. Report for troubleshooting"
316 .code
= BGP_ERR_LABEL
,
317 .title
= "Failure to apply label",
318 .description
= "BGP attempted to attempted to apply a label but could not",
319 .suggestion
= "Most likely a bug. If the problem persists, report the problem for troubleshooting"
322 .code
= BGP_ERR_MULTIPATH
,
323 .title
= "Multipath specified is invalid",
324 .description
= "BGP was started with an invalid ecmp/multipath value",
325 .suggestion
= "Correct the ecmp/multipath value supplied when starting the BGP daemon"
328 .code
= BGP_ERR_PKT_PROCESS
,
329 .title
= "Failure to process a packet",
330 .description
= "BGP attempted to process a received packet but could not",
331 .suggestion
= "Most likely a bug. If the problem persists, report the problem for troubleshooting"
334 .code
= BGP_ERR_CONNECT
,
335 .title
= "Failure to connect to peer",
336 .description
= "BGP attempted to send open to peer but couldn't connect",
337 .suggestion
= "Most likely a bug. If the problem persists, report the problem for troubleshooting"
341 .title
= "BGP FSM issue",
342 .description
= "BGP neighbor transition problem",
343 .suggestion
= "Most likely a bug. If the problem persists, report the problem for troubleshooting"
347 .title
= "BGP VNI creation issue",
348 .description
= "BGP could not create a new VNI",
349 .suggestion
= "Most likely a bug. If the problem persists, report the problem for troubleshooting"
352 .code
= BGP_ERR_NO_DFLT
,
353 .title
= "BGP default instance missing",
354 .description
= "BGP could not find default instance",
355 .suggestion
= "Define a default instance of BGP since some feature requires it's existence"
358 .code
= BGP_ERR_VTEP_INVALID
,
359 .title
= "BGP remote VTEP invalid",
360 .description
= "BGP remote VTEP is invalid and cannot be used",
361 .suggestion
= "Correct remote VTEP configuration or resolve the source of the problem"
364 .code
= BGP_ERR_ES_INVALID
,
365 .title
= "BGP ES route error",
366 .description
= "BGP ES route incorrect, learned both local and remote",
367 .suggestion
= "Correct configuration or addressing so that same not learned both local and remote"
370 .code
= BGP_ERR_EVPN_ROUTE_DELETE
,
371 .title
= "BGP EVPN route delete error",
372 .description
= "BGP attempted to delete an EVPN route and failed",
373 .suggestion
= "Most likely a bug. If the problem persists, report the problem for troubleshooting"
376 .code
= BGP_ERR_EVPN_FAIL
,
377 .title
= "BGP EVPN install/uninstall error",
378 .description
= "BGP attempted to install or uninstall an EVPN prefix and failed",
379 .suggestion
= "Most likely a bug. If the problem persists, report the problem for troubleshooting"
382 .code
= BGP_ERR_EVPN_ROUTE_INVALID
,
383 .title
= "BGP EVPN route received with invalid contents",
384 .description
= "BGP received an EVPN route with invalid contents",
385 .suggestion
= "Determine the source of the EVPN route and resolve whatever is causing invalid contents"
388 .code
= BGP_ERR_EVPN_ROUTE_CREATE
,
389 .title
= "BGP EVPN route create error",
390 .description
= "BGP attempted to create an EVPN route and failed",
391 .suggestion
= "Most likely a bug. If the problem persists, report the problem for troubleshooting"
394 .code
= BGP_ERR_ES_CREATE
,
395 .title
= "BGP EVPN ES entry create error",
396 .description
= "BGP attempted to create an EVPN ES entry and failed",
397 .suggestion
= "Most likely a bug. If the problem persists, report the problem for troubleshooting"
400 .code
= BGP_ERR_MULTI_INSTANCE
,
401 .title
= "BGP config multi-instance issue",
402 .description
= "BGP configuration attempting multiple instances without enabling the feature",
403 .suggestion
= "Correct the configuration so that bgp multiple-instance is enabled if desired"
406 .code
= BGP_ERR_EVPN_AS_MISMATCH
,
407 .title
= "BGP AS configuration issue",
408 .description
= "BGP configuration attempted for a different AS than currently configured",
409 .suggestion
= "Correct the configuration so that the correct BGP AS number is used"
412 .code
= BGP_ERR_EVPN_INSTANCE_MISMATCH
,
413 .title
= "BGP EVPN AS and process name mismatch",
414 .description
= "BGP configuration has AS and process name mismatch",
415 .suggestion
= "Correct the configuration so that the BGP AS number and instance name are consistent"
418 .code
= BGP_ERR_FLOWSPEC_PACKET
,
419 .title
= "BGP Flowspec packet processing error",
420 .description
= "The BGP flowspec subsystem has detected a error in the send or receive of a packet",
421 .suggestion
= "Gather log files from both sides of the peering relationship and open an issue"
424 .code
= BGP_ERR_FLOWSPEC_INSTALLATION
,
425 .title
= "BGP Flowspec Installation/removal Error",
426 .description
= "The BGP flowspec subsystem has detected that there was a failure for installation/removal/modification of Flowspec from the dataplane",
427 .suggestion
= "Gather log files from the router and open an issue, Restart FRR"
433 /* clang-format on */
435 void bgp_error_init(void)
437 log_ref_add(ferr_bgp_warn
);
438 log_ref_add(ferr_bgp_err
);
439 log_ref_add(ferr_bgp_warn
);