summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_attr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index b3944e5f28..47d9d3ad35 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -1894,7 +1894,7 @@ bgp_attr_cluster_list(struct bgp_attr_parser_args *args)
* malformed, the UPDATE message SHALL be handled using the approach
* of "treat-as-withdraw".
*/
- if (length % 4) {
+ if (length == 0 || length % 4) {
flog_err(EC_BGP_ATTR_LEN, "Bad cluster list length %d", length);
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,