blob: 1eb913be479042da032346cfef1e8674d226ef91 (
plain) (
tree)
|
|
Purpose: Allows invalid NLRI attributes due to truncation issue.
Upstream: Not at the moment
diff -urN frr-frr-7.4.orig/bgpd/bgp_attr.c frr-frr-7.4/bgpd/bgp_attr.c
--- frr-frr-7.4.orig/bgpd/bgp_attr.c 2020-10-08 18:05:11.115803185 -0600
+++ frr-frr-7.4/bgpd/bgp_attr.c 2020-10-08 18:06:18.132718181 -0600
@@ -2199,9 +2199,13 @@
*/
if (length == 0) {
attr->lcommunity = NULL;
+#if 0
/* Empty extcomm doesn't seem to be invalid per se */
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_OPT_ATTR_ERR,
args->total);
+#else
+ return BGP_ATTR_PARSE_PROCEED;
+#endif
}
attr->lcommunity = lcommunity_parse(stream_pnt(peer->curr), length);
@@ -2213,8 +2213,12 @@
stream_forward_getp(peer->curr, length);
if (!attr->lcommunity)
+#if 0
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_OPT_ATTR_ERR,
args->total);
+#else
+ return BGP_ATTR_PARSE_PROCEED;
+#endif
attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES);
|