summaryrefslogtreecommitdiffstats
path: root/proto/bgp/attrs.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto/bgp/attrs.c')
-rw-r--r--proto/bgp/attrs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c
index d8a6aad..91d4d06 100644
--- a/proto/bgp/attrs.c
+++ b/proto/bgp/attrs.c
@@ -347,7 +347,7 @@ bgp_get_attr_len(eattr *a)
* The bgp_encode_attrs() function takes a list of extended attributes
* and converts it to its BGP representation (a part of an Update message).
*
- * Result: Length of the attribute block generated.
+ * Result: Length of the attribute block generated or -1 if not enough space.
*/
unsigned int
bgp_encode_attrs(struct bgp_proto *p, byte *w, ea_list *attrs, int remains)
@@ -488,8 +488,7 @@ bgp_encode_attrs(struct bgp_proto *p, byte *w, ea_list *attrs, int remains)
return w - start;
err_no_buffer:
- log(L_ERR "BGP: attribute list too long, ignoring the remaining attributes");
- return w - start;
+ return -1;
}
static void