diff options
| -rw-r--r-- | bgpd/bgp_attr.c | 2 | ||||
| -rw-r--r-- | bgpd/bgp_clist.c | 31 | ||||
| -rw-r--r-- | bgpd/bgp_dump.c | 7 | ||||
| -rw-r--r-- | bgpd/bgp_dump.h | 1 | ||||
| -rw-r--r-- | bgpd/bgp_fsm.c | 8 | ||||
| -rw-r--r-- | bgpd/bgp_packet.c | 20 | ||||
| -rw-r--r-- | bgpd/bgp_packet.h | 12 | ||||
| -rw-r--r-- | bgpd/bgp_route.c | 24 | ||||
| -rw-r--r-- | bgpd/bgp_route.h | 9 | ||||
| -rw-r--r-- | bgpd/bgp_vty.c | 4 | ||||
| -rw-r--r-- | bgpd/bgpd.c | 32 | ||||
| -rw-r--r-- | bgpd/bgpd.h | 18 | ||||
| -rw-r--r-- | isisd/isis_misc.c | 4 | ||||
| -rw-r--r-- | ospfd/ospfd.c | 2 | ||||
| -rw-r--r-- | python/clidef.py | 4 | ||||
| -rw-r--r-- | zebra/irdp_packet.c | 12 | ||||
| -rw-r--r-- | zebra/zebra_errors.c | 8 | ||||
| -rw-r--r-- | zebra/zebra_errors.h | 1 |
18 files changed, 167 insertions, 32 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index d46623c9d2..35946444dd 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -2974,6 +2974,8 @@ size_t bgp_packet_mpattr_prefix_size(afi_t afi, safi_t safi, struct prefix *p) int size = PSIZE(p->prefixlen); if (safi == SAFI_MPLS_VPN) size += 88; + else if (safi == SAFI_LABELED_UNICAST) + size += BGP_LABEL_BYTES; else if (afi == AFI_L2VPN && safi == SAFI_EVPN) size += 232; // TODO: Maximum possible for type-2, type-3 and // type-5 diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c index ce617fe6b5..ff2ea6f7cd 100644 --- a/bgpd/bgp_clist.c +++ b/bgpd/bgp_clist.c @@ -27,6 +27,7 @@ #include "filter.h" #include "stream.h" #include "jhash.h" +#include "frrstr.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_community.h" @@ -1026,6 +1027,33 @@ struct lcommunity *lcommunity_list_match_delete(struct lcommunity *lcom, return lcom; } +/* Helper to check if every octet do not exceed UINT_MAX */ +static int lcommunity_list_valid(const char *community) +{ + int octets = 0; + char **splits; + int num; + + frrstr_split(community, ":", &splits, &num); + + for (int i = 0; i < num; i++) { + if (strtoul(splits[i], NULL, 10) > UINT_MAX) + return 0; + + if (strlen(splits[i]) == 0) + return 0; + + octets++; + XFREE(MTYPE_TMP, splits[i]); + } + XFREE(MTYPE_TMP, splits); + + if (octets < 3) + return 0; + + return 1; +} + /* Set lcommunity-list. */ int lcommunity_list_set(struct community_list_handler *ch, const char *name, const char *str, int direct, int style) @@ -1054,6 +1082,9 @@ int lcommunity_list_set(struct community_list_handler *ch, const char *name, } if (str) { + if (!lcommunity_list_valid(str)) + return COMMUNITY_LIST_ERR_MALFORMED_VAL; + if (style == LARGE_COMMUNITY_LIST_STANDARD) lcom = lcommunity_str2com(str); else diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index 751140850a..d12c0b6c75 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -37,6 +37,7 @@ #include "bgpd/bgp_attr.h" #include "bgpd/bgp_dump.h" #include "bgpd/bgp_errors.h" +#include "bgpd/bgp_packet.h" enum bgp_dump_type { BGP_DUMP_ALL, @@ -555,7 +556,8 @@ static void bgp_dump_packet_func(struct bgp_dump *bgp_dump, struct peer *peer, } /* Called from bgp_packet.c when BGP packet is received. */ -void bgp_dump_packet(struct peer *peer, int type, struct stream *packet) +static int bgp_dump_packet(struct peer *peer, uint8_t type, bgp_size_t size, + struct stream *packet) { /* bgp_dump_all. */ bgp_dump_packet_func(&bgp_dump_all, peer, packet); @@ -563,6 +565,7 @@ void bgp_dump_packet(struct peer *peer, int type, struct stream *packet) /* bgp_dump_updates. */ if (type == BGP_MSG_UPDATE) bgp_dump_packet_func(&bgp_dump_updates, peer, packet); + return 0; } static unsigned int bgp_dump_parse_time(const char *str) @@ -862,6 +865,8 @@ void bgp_dump_init(void) install_element(CONFIG_NODE, &dump_bgp_all_cmd); install_element(CONFIG_NODE, &no_dump_bgp_all_cmd); + + hook_register(bgp_packet_dump, bgp_dump_packet); } void bgp_dump_finish(void) diff --git a/bgpd/bgp_dump.h b/bgpd/bgp_dump.h index f73081b2e2..5ec0561b05 100644 --- a/bgpd/bgp_dump.h +++ b/bgpd/bgp_dump.h @@ -52,6 +52,5 @@ extern void bgp_dump_init(void); extern void bgp_dump_finish(void); extern void bgp_dump_state(struct peer *, int, int); -extern void bgp_dump_packet(struct peer *, int, struct stream *); #endif /* _QUAGGA_BGP_DUMP_H */ diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index dd765731dc..4348e6b240 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -184,9 +184,11 @@ static struct peer *peer_xfer_conn(struct peer *from_peer) EC_BGP_PKT_PROCESS, "[%s] Dropping pending packet on connection transfer:", peer->host); - uint16_t type = stream_getc_from(peer->curr, - BGP_MARKER_SIZE + 2); - bgp_dump_packet(peer, type, peer->curr); + /* there used to be a bgp_packet_dump call here, but + * that's extremely confusing since there's no way to + * identify the packet in MRT dumps or BMP as dropped + * due to connection transfer. + */ stream_free(peer->curr); peer->curr = NULL; } diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 5654fe5329..99522a6522 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -63,6 +63,16 @@ #include "bgpd/bgp_keepalives.h" #include "bgpd/bgp_flowspec.h" +DEFINE_HOOK(bgp_packet_dump, + (struct peer *peer, uint8_t type, bgp_size_t size, + struct stream *s), + (peer, type, size, s)) + +DEFINE_HOOK(bgp_packet_send, + (struct peer *peer, uint8_t type, bgp_size_t size, + struct stream *s), + (peer, type, size, s)) + /** * Sets marker and type fields for a BGP message. * @@ -542,6 +552,7 @@ void bgp_open_send(struct peer *peer) /* Dump packet if debug option is set. */ /* bgp_packet_dump (s); */ + hook_call(bgp_packet_send, peer, BGP_MSG_OPEN, stream_get_endp(s), s); /* Add packet to the peer. */ bgp_packet_add(peer, s); @@ -681,9 +692,9 @@ void bgp_notify_send_with_data(struct peer *peer, uint8_t code, * in place because we are sometimes called with a doppelganger peer, * who tends to have a plethora of fields nulled out. */ - if (peer->curr && peer->last_reset_cause_size) { + if (peer->curr) { size_t packetsize = stream_get_endp(peer->curr); - assert(packetsize <= peer->last_reset_cause_size); + assert(packetsize <= sizeof(peer->last_reset_cause)); memcpy(peer->last_reset_cause, peer->curr->data, packetsize); peer->last_reset_cause_size = packetsize; } @@ -1518,6 +1529,8 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size) || BGP_DEBUG(update, UPDATE_PREFIX)) { ret = bgp_dump_attr(&attr, peer->rcvd_attr_str, BUFSIZ); + peer->stat_upd_7606++; + if (attr_parse_ret == BGP_ATTR_PARSE_WITHDRAW) flog_err( EC_BGP_UPDATE_RCV, @@ -2240,8 +2253,7 @@ int bgp_process_packet(struct thread *thread) size = stream_getw(peer->curr); type = stream_getc(peer->curr); - /* BGP packet dump function. */ - bgp_dump_packet(peer, type, peer->curr); + hook_call(bgp_packet_dump, peer, type, size, peer->curr); /* adjust size to exclude the marker + length + type */ size -= BGP_HEADER_SIZE; diff --git a/bgpd/bgp_packet.h b/bgpd/bgp_packet.h index 06a190585b..e8eacee589 100644 --- a/bgpd/bgp_packet.h +++ b/bgpd/bgp_packet.h @@ -21,6 +21,18 @@ #ifndef _QUAGGA_BGP_PACKET_H #define _QUAGGA_BGP_PACKET_H +#include "hook.h" + +DECLARE_HOOK(bgp_packet_dump, + (struct peer *peer, uint8_t type, bgp_size_t size, + struct stream *s), + (peer, type, size, s)) + +DECLARE_HOOK(bgp_packet_send, + (struct peer *peer, uint8_t type, bgp_size_t size, + struct stream *s), + (peer, type, size, s)) + #define BGP_NLRI_LENGTH 1U #define BGP_TOTAL_ATTR_LEN 2U #define BGP_UNFEASIBLE_LEN 2U diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 9e3ad4e8f2..aa02cc3c63 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -107,6 +107,12 @@ static const struct message bgp_pmsi_tnltype_str[] = { #define VRFID_NONE_STR "-" +DEFINE_HOOK(bgp_process, + (struct bgp *bgp, afi_t afi, safi_t safi, + struct bgp_node *bn, struct peer *peer, bool withdraw), + (bgp, afi, safi, bn, peer, withdraw)) + + struct bgp_node *bgp_afi_node_get(struct bgp_table *table, afi_t afi, safi_t safi, struct prefix *p, struct prefix_rd *prd) @@ -2819,6 +2825,8 @@ void bgp_rib_remove(struct bgp_node *rn, struct bgp_path_info *pi, if (!CHECK_FLAG(pi->flags, BGP_PATH_HISTORY)) bgp_path_info_delete(rn, pi); /* keep historical info */ + hook_call(bgp_process, peer->bgp, afi, safi, rn, peer, true); + bgp_process(peer->bgp, rn, afi, safi); } @@ -3068,6 +3076,7 @@ int bgp_update(struct peer *peer, struct prefix *p, uint32_t addpath_id, if (aspath_loop_check(attr->aspath, peer->change_local_as) > aspath_loop_count) { + peer->stat_pfx_aspath_loop++; reason = "as-path contains our own AS;"; goto filtered; } @@ -3088,6 +3097,7 @@ int bgp_update(struct peer *peer, struct prefix *p, uint32_t addpath_id, || (CHECK_FLAG(bgp->config, BGP_CONFIG_CONFEDERATION) && aspath_loop_check(attr->aspath, bgp->confed_id) > peer->allowas_in[afi][safi])) { + peer->stat_pfx_aspath_loop++; reason = "as-path contains our own AS;"; goto filtered; } @@ -3096,18 +3106,21 @@ int bgp_update(struct peer *peer, struct prefix *p, uint32_t addpath_id, /* Route reflector originator ID check. */ if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_ORIGINATOR_ID) && IPV4_ADDR_SAME(&bgp->router_id, &attr->originator_id)) { + peer->stat_pfx_originator_loop++; reason = "originator is us;"; goto filtered; } /* Route reflector cluster ID check. */ if (bgp_cluster_filter(peer, attr)) { + peer->stat_pfx_cluster_loop++; reason = "reflected from the same cluster;"; goto filtered; } /* Apply incoming filter. */ if (bgp_input_filter(peer, p, attr, afi, safi) == FILTER_DENY) { + peer->stat_pfx_filter++; reason = "filter;"; goto filtered; } @@ -3138,6 +3151,7 @@ int bgp_update(struct peer *peer, struct prefix *p, uint32_t addpath_id, * the attr (which takes over the memory references) */ if (bgp_input_modifier(peer, p, &new_attr, afi, safi, NULL) == RMAP_DENY) { + peer->stat_pfx_filter++; reason = "route-map;"; bgp_attr_flush(&new_attr); goto filtered; @@ -3163,12 +3177,14 @@ int bgp_update(struct peer *peer, struct prefix *p, uint32_t addpath_id, /* next hop check. */ if (!CHECK_FLAG(peer->flags, PEER_FLAG_IS_RFAPI_HD) && bgp_update_martian_nexthop(bgp, afi, safi, &new_attr)) { + peer->stat_pfx_nh_invalid++; reason = "martian or self next-hop;"; bgp_attr_flush(&new_attr); goto filtered; } if (bgp_mac_entry_exists(p) || bgp_mac_exist(&attr->rmac)) { + peer->stat_pfx_nh_invalid++; reason = "self mac;"; goto filtered; } @@ -3180,6 +3196,8 @@ int bgp_update(struct peer *peer, struct prefix *p, uint32_t addpath_id, pi->uptime = bgp_clock(); same_attr = attrhash_cmp(pi->attr, attr_new); + hook_call(bgp_process, bgp, afi, safi, rn, peer, true); + /* Same attribute comes in. */ if (!CHECK_FLAG(pi->flags, BGP_PATH_REMOVED) && attrhash_cmp(pi->attr, attr_new) @@ -3608,6 +3626,8 @@ int bgp_update(struct peer *peer, struct prefix *p, uint32_t addpath_id, if (safi == SAFI_EVPN) bgp_evpn_import_route(bgp, afi, safi, p, new); + hook_call(bgp_process, bgp, afi, safi, rn, peer, false); + /* Process change. */ bgp_process(bgp, rn, afi, safi); @@ -3639,6 +3659,8 @@ int bgp_update(struct peer *peer, struct prefix *p, uint32_t addpath_id, /* This BGP update is filtered. Log the reason then update BGP entry. */ filtered: + hook_call(bgp_process, bgp, afi, safi, rn, peer, true); + if (bgp_debug_update(peer, p, NULL, 1)) { if (!peer->rcvd_attr_printed) { zlog_debug("%s rcvd UPDATE w/ attr: %s", peer->host, @@ -3727,6 +3749,8 @@ int bgp_withdraw(struct peer *peer, struct prefix *p, uint32_t addpath_id, if (CHECK_FLAG(peer->af_flags[afi][safi], PEER_FLAG_SOFT_RECONFIG) && peer != bgp->peer_self) if (!bgp_adj_in_unset(rn, peer, addpath_id)) { + peer->stat_pfx_dup_withdraw++; + if (bgp_debug_update(peer, p, NULL, 1)) { bgp_debug_rdpfxpath2str( afi, safi, prd, p, label, num_labels, diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h index 0f2363dc6f..704cd39710 100644 --- a/bgpd/bgp_route.h +++ b/bgpd/bgp_route.h @@ -21,6 +21,9 @@ #ifndef _QUAGGA_BGP_ROUTE_H #define _QUAGGA_BGP_ROUTE_H +#include <stdbool.h> + +#include "hook.h" #include "queue.h" #include "nexthop.h" #include "bgp_table.h" @@ -447,6 +450,12 @@ static inline bool is_pi_family_matching(struct bgp_path_info *pi, return false; } +/* called before bgp_process() */ +DECLARE_HOOK(bgp_process, + (struct bgp *bgp, afi_t afi, safi_t safi, + struct bgp_node *bn, struct peer *peer, bool withdraw), + (bgp, afi, safi, bn, peer, withdraw)) + /* Prototypes. */ extern void bgp_rib_remove(struct bgp_node *rn, struct bgp_path_info *pi, struct peer *peer, afi_t afi, safi_t safi); diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 6e0e079cd8..d7f6b65384 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -925,7 +925,7 @@ DEFUN (no_auto_summary, /* "router bgp" commands. */ DEFUN_NOSH (router_bgp, router_bgp_cmd, - "router bgp [(1-4294967295) [<view|vrf> VIEWVRFNAME]]", + "router bgp [(1-4294967295)$instasn [<view|vrf> VIEWVRFNAME]]", ROUTER_STR BGP_STR AS_STR @@ -1015,7 +1015,7 @@ DEFUN_NOSH (router_bgp, /* "no router bgp" commands. */ DEFUN (no_router_bgp, no_router_bgp_cmd, - "no router bgp [(1-4294967295) [<view|vrf> VIEWVRFNAME]]", + "no router bgp [(1-4294967295)$instasn [<view|vrf> VIEWVRFNAME]]", NO_STR ROUTER_STR BGP_STR diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 6f794928f8..d79a68dcab 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -94,6 +94,10 @@ DEFINE_MTYPE_STATIC(BGPD, BGP_EVPN_INFO, "BGP EVPN instance information"); DEFINE_QOBJ_TYPE(bgp_master) DEFINE_QOBJ_TYPE(bgp) DEFINE_QOBJ_TYPE(peer) +DEFINE_HOOK(bgp_inst_delete, (struct bgp *bgp), (bgp)) +DEFINE_HOOK(bgp_inst_config_write, + (struct bgp *bgp, struct vty *vty), + (bgp, vty)) /* BGP process wide configuration. */ static struct bgp_master bgp_master; @@ -3286,6 +3290,9 @@ int bgp_delete(struct bgp *bgp) int i; assert(bgp); + + hook_call(bgp_inst_delete, bgp); + THREAD_OFF(bgp->t_startup); THREAD_OFF(bgp->t_maxmed_onstartup); THREAD_OFF(bgp->t_update_delay); @@ -7797,6 +7804,8 @@ int bgp_config_write(struct vty *vty) /* EVPN configuration. */ bgp_config_write_family(vty, bgp, AFI_L2VPN, SAFI_EVPN); + hook_call(bgp_inst_config_write, bgp, vty); + #if ENABLE_BGP_VNC bgp_rfapi_cfg_write(vty, bgp); #endif @@ -7878,8 +7887,31 @@ static void bgp_viewvrf_autocomplete(vector comps, struct cmd_token *token) } } +static void bgp_instasn_autocomplete(vector comps, struct cmd_token *token) +{ + struct listnode *next, *next2; + struct bgp *bgp, *bgp2; + char buf[11]; + + for (ALL_LIST_ELEMENTS_RO(bm->bgp, next, bgp)) { + /* deduplicate */ + for (ALL_LIST_ELEMENTS_RO(bm->bgp, next2, bgp2)) { + if (bgp2->as == bgp->as) + break; + if (bgp2 == bgp) + break; + } + if (bgp2 != bgp) + continue; + + snprintf(buf, sizeof(buf), "%u", bgp->as); + vector_set(comps, XSTRDUP(MTYPE_COMPLETION, buf)); + } +} + static const struct cmd_variable_handler bgp_viewvrf_var_handlers[] = { {.tokenname = "VIEWVRFNAME", .completions = bgp_viewvrf_autocomplete}, + {.varname = "instasn", .completions = bgp_instasn_autocomplete}, {.completions = NULL}, }; diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index 4bce73898f..777db0ce22 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -24,6 +24,7 @@ #include "qobj.h" #include <pthread.h> +#include "hook.h" #include "frr_pthread.h" #include "lib/json.h" #include "vrf.h" @@ -572,6 +573,11 @@ struct bgp { }; DECLARE_QOBJ_TYPE(bgp) +DECLARE_HOOK(bgp_inst_delete, (struct bgp *bgp), (bgp)) +DECLARE_HOOK(bgp_inst_config_write, + (struct bgp *bgp, struct vty *vty), + (bgp, vty)) + #define BGP_ROUTE_ADV_HOLD(bgp) (bgp->main_peers_update_hold) #define IS_BGP_INST_KNOWN_TO_ZEBRA(bgp) \ @@ -1077,6 +1083,14 @@ struct peer { _Atomic uint32_t dynamic_cap_in; /* Dynamic Capability input count. */ _Atomic uint32_t dynamic_cap_out; /* Dynamic Capability output count. */ + uint32_t stat_pfx_filter; + uint32_t stat_pfx_aspath_loop; + uint32_t stat_pfx_originator_loop; + uint32_t stat_pfx_cluster_loop; + uint32_t stat_pfx_nh_invalid; + uint32_t stat_pfx_dup_withdraw; + uint32_t stat_upd_7606; /* RFC7606: treat-as-withdraw */ + /* BGP state count */ uint32_t established; /* Established */ uint32_t dropped; /* Dropped */ @@ -1153,7 +1167,7 @@ struct peer { unsigned long weight[AFI_MAX][SAFI_MAX]; /* peer reset cause */ - char last_reset; + uint8_t last_reset; #define PEER_DOWN_RID_CHANGE 1 /* bgp router-id command */ #define PEER_DOWN_REMOTE_AS_CHANGE 2 /* neighbor remote-as command */ #define PEER_DOWN_LOCAL_AS_CHANGE 3 /* neighbor local-as command */ @@ -1180,7 +1194,7 @@ struct peer { #define PEER_DOWN_BFD_DOWN 24 /* BFD down */ #define PEER_DOWN_IF_DOWN 25 /* Interface down */ #define PEER_DOWN_NBR_ADDR_DEL 26 /* Peer address lost */ - unsigned long last_reset_cause_size; + size_t last_reset_cause_size; uint8_t last_reset_cause[BGP_MAX_PACKET_SIZE]; /* The kind of route-map Flags.*/ diff --git a/isisd/isis_misc.c b/isisd/isis_misc.c index d4c38efaf3..3ad8278e10 100644 --- a/isisd/isis_misc.c +++ b/isisd/isis_misc.c @@ -519,7 +519,7 @@ void log_multiline(int priority, const char *prefix, const char *format, ...) char *p; va_start(ap, format); - p = asnprintfrr(MTYPE_TMP, shortbuf, sizeof(shortbuf), format, ap); + p = vasnprintfrr(MTYPE_TMP, shortbuf, sizeof(shortbuf), format, ap); va_end(ap); if (!p) @@ -542,7 +542,7 @@ void vty_multiline(struct vty *vty, const char *prefix, const char *format, ...) char *p; va_start(ap, format); - p = asnprintfrr(MTYPE_TMP, shortbuf, sizeof(shortbuf), format, ap); + p = vasnprintfrr(MTYPE_TMP, shortbuf, sizeof(shortbuf), format, ap); va_end(ap); if (!p) diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 35c313e555..aa38a42714 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -766,7 +766,7 @@ static void ospf_finish_final(struct ospf *ospf) if (!ext_list) continue; - for (ALL_LIST_ELEMENTS_RO(ext_list, node, ext)) { + for (ALL_LIST_ELEMENTS(ext_list, node, nnode, ext)) { if (ext->external_info) for (rn = route_top(ext->external_info); rn; rn = route_next(rn)) { diff --git a/python/clidef.py b/python/clidef.py index 85464a62d4..bc2f5caebf 100644 --- a/python/clidef.py +++ b/python/clidef.py @@ -346,9 +346,11 @@ if __name__ == '__main__': if args.show: dumpfd = sys.stderr + basepath = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + macros = Macros() macros.load('lib/route_types.h') - macros.load('lib/command.h') + macros.load(os.path.join(basepath, 'lib/command.h')) # sigh :( macros['PROTO_REDIST_STR'] = 'FRR_REDIST_STR_ISISD' diff --git a/zebra/irdp_packet.c b/zebra/irdp_packet.c index 2804787620..f6fe6bbf1e 100644 --- a/zebra/irdp_packet.c +++ b/zebra/irdp_packet.c @@ -136,10 +136,10 @@ static void parse_irdp_packet(char *p, int len, struct interface *ifp) return; if (icmp->code != 0) { - flog_warn(EC_ZEBRA_IRDP_BAD_TYPE_CODE, - "IRDP: RX packet type %d from %s. Bad ICMP type code," - " silently ignored", - icmp->type, inet_ntoa(src)); + flog_warn( + EC_ZEBRA_IRDP_BAD_TYPE_CODE, + "IRDP: RX packet type %d from %s. Bad ICMP type code, silently ignored", + icmp->type, inet_ntoa(src)); return; } @@ -174,8 +174,8 @@ static void parse_irdp_packet(char *p, int len, struct interface *ifp) default: flog_warn( - EC_ZEBRA_IRDP_BAD_TYPE, - "IRDP: RX type %d from %s. Bad ICMP type, silently ignored", + EC_ZEBRA_IRDP_BAD_TYPE_CODE, + "IRDP: RX packet type %d from %s. Bad ICMP type code, silently ignored", icmp->type, inet_ntoa(src)); } } diff --git a/zebra/zebra_errors.c b/zebra/zebra_errors.c index cb5f30df1f..5f0a9ec011 100644 --- a/zebra/zebra_errors.c +++ b/zebra/zebra_errors.c @@ -381,14 +381,6 @@ static struct log_ref ferr_zebra_err[] = { "If you wish to receive the messages, change your IRDP settings accordingly.", }, { - .code = EC_ZEBRA_IRDP_BAD_TYPE, - .title = - "Zebra received IRDP packet with bad type", - .description = - "THIS IS BULLSHIT REMOVE ME", - .suggestion = "asdf", - }, - { .code = EC_ZEBRA_RNH_NO_TABLE, .title = "Zebra could not find table for next hop", diff --git a/zebra/zebra_errors.h b/zebra/zebra_errors.h index 2b7831a408..222055dd81 100644 --- a/zebra/zebra_errors.h +++ b/zebra/zebra_errors.h @@ -85,7 +85,6 @@ enum zebra_log_refs { EC_ZEBRA_IRDP_BAD_CHECKSUM, EC_ZEBRA_IRDP_BAD_TYPE_CODE, EC_ZEBRA_IRDP_BAD_RX_FLAGS, - EC_ZEBRA_IRDP_BAD_TYPE, EC_ZEBRA_RNH_NO_TABLE, EC_ZEBRA_IFLIST_FAILED, EC_ZEBRA_FPM_FORMAT_UNKNOWN, |
