1
0
mirror of https://github.com/rtbrick/bngblaster.git synced 2024-05-06 15:54:57 +00:00

correctly pad SID Index subTLV

This commit is contained in:
Hannes Gredler
2023-09-12 08:24:36 +00:00
parent ad278395a1
commit 5a9afdfe02

View File

@@ -996,10 +996,11 @@ lspgen_serialize_ospf2_state(lsdb_attr_t *attr, lsdb_packet_t *packet, uint16_t
/* Prefix SID - XXX Move this to Level 4*/
push_be_uint(buf2, 2, 2); /* Type */
push_be_uint(buf2, 2, 7); /* Length */
push_be_uint(buf2, 2, 8); /* Length */
push_be_uint(buf2, 3, 0); /* Flags, Reserved, MT-ID */
push_be_uint(buf2, 1, attr->key.prefix.sid_algo); /* Algorithm */
push_be_uint(buf2, 3, attr->key.prefix.sid); /* SID Index */
push_be_uint(buf2, 4, attr->key.prefix.sid); /* SID Index */
push_pad4(buf2);
write_be_uint(buf2->data+2, 2, buf2->idx-4); /* Update length */
push_pad4(buf2);