diff options
| -rw-r--r-- | bgpd/bgp_flowspec.c | 7 | ||||
| -rw-r--r-- | bgpd/bgp_route.h | 2 | ||||
| -rw-r--r-- | ospfd/ospf_dump.c | 7 | ||||
| -rw-r--r-- | ospfd/ospf_dump.h | 2 |
4 files changed, 8 insertions, 10 deletions
diff --git a/bgpd/bgp_flowspec.c b/bgpd/bgp_flowspec.c index 8d5ca5e777..f9debe43cd 100644 --- a/bgpd/bgp_flowspec.c +++ b/bgpd/bgp_flowspec.c @@ -127,6 +127,13 @@ int bgp_nlri_parse_flowspec(struct peer *peer, struct attr *attr, psize); return BGP_NLRI_PARSE_ERROR_PACKET_OVERFLOW; } + + if (psize == 0) { + flog_err(EC_BGP_FLOWSPEC_PACKET, + "Flowspec NLRI length 0 which makes no sense"); + return BGP_NLRI_PARSE_ERROR_PACKET_OVERFLOW; + } + if (bgp_fs_nlri_validate(pnt, psize, afi) < 0) { flog_err( EC_BGP_FLOWSPEC_PACKET, diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h index d0cf7e5d77..66cc62ab09 100644 --- a/bgpd/bgp_route.h +++ b/bgpd/bgp_route.h @@ -67,7 +67,7 @@ enum bgp_show_adj_route_type { #define BGP_SHOW_RPKI_HEADER \ "RPKI validation codes: V valid, I invalid, N Not found\n\n" #define BGP_SHOW_HEADER " Network Next Hop Metric LocPrf Weight Path\n" -#define BGP_SHOW_HEADER_WIDE " Network Next Hop Metric LocPrf Weight Path\n" +#define BGP_SHOW_HEADER_WIDE " Network Next Hop Metric LocPrf Weight Path\n" /* Maximum number of labels we can process or send with a prefix. We * really do only 1 for MPLS (BGP-LU) but we can do 2 for EVPN-VxLAN. diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index de51500b0a..b74b84e37d 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -133,13 +133,6 @@ const char *ospf_if_name_string(struct ospf_interface *oi) return buf; } -/* Display only the nbr state.*/ -void ospf_nbr_state_message(struct ospf_neighbor *nbr, char *buf, size_t size) -{ - snprintf(buf, size, "%s", - lookup_msg(ospf_nsm_state_msg, nbr->state, NULL)); -} - int ospf_nbr_ism_state(struct ospf_neighbor *nbr) { int state; diff --git a/ospfd/ospf_dump.h b/ospfd/ospf_dump.h index 596d49256f..0f217971ee 100644 --- a/ospfd/ospf_dump.h +++ b/ospfd/ospf_dump.h @@ -140,8 +140,6 @@ extern const char *ospf_area_name_string(struct ospf_area *); extern const char *ospf_area_desc_string(struct ospf_area *); extern const char *ospf_if_name_string(struct ospf_interface *); extern int ospf_nbr_ism_state(struct ospf_neighbor *nbr); -extern void ospf_nbr_state_message(struct ospf_neighbor *nbr, char *buf, - size_t size); extern void ospf_nbr_ism_state_message(struct ospf_neighbor *nbr, char *buf, size_t size); extern const char *ospf_timer_dump(struct thread *, char *, size_t); |
