BGP: Do not keep BAF_EXT_LEN flag internally
The flag makes sense just in external representation. It is reset during BGP export, but keeping it internally broke MRT dumps for short attributes that used it anyways. Thanks to Simon Marsh for the bugreport and the patch.
This commit is contained in:
parent
a06469d9fc
commit
7a74ad5a61
1 changed files with 2 additions and 2 deletions
|
@ -88,7 +88,7 @@ bgp_set_attr(ea_list **attrs, struct linpool *pool, uint code, uint flags, uintp
|
||||||
attrs,
|
attrs,
|
||||||
pool,
|
pool,
|
||||||
EA_CODE(PROTOCOL_BGP, code),
|
EA_CODE(PROTOCOL_BGP, code),
|
||||||
flags,
|
flags & ~BAF_EXT_LEN,
|
||||||
bgp_attr_table[code].type,
|
bgp_attr_table[code].type,
|
||||||
val
|
val
|
||||||
);
|
);
|
||||||
|
@ -118,7 +118,7 @@ bgp_set_attr(ea_list **attrs, struct linpool *pool, uint code, uint flags, uintp
|
||||||
static inline int
|
static inline int
|
||||||
bgp_put_attr_hdr3(byte *buf, uint code, uint flags, uint len)
|
bgp_put_attr_hdr3(byte *buf, uint code, uint flags, uint len)
|
||||||
{
|
{
|
||||||
*buf++ = flags;
|
*buf++ = flags & ~BAF_EXT_LEN;
|
||||||
*buf++ = code;
|
*buf++ = code;
|
||||||
*buf++ = len;
|
*buf++ = len;
|
||||||
return 3;
|
return 3;
|
||||||
|
|
Loading…
Reference in a new issue