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

LSPGEN: fix OSPFv3 external prefix

This commit is contained in:
Christian Giese
2024-04-30 17:00:00 +00:00
parent 90888fc122
commit a913ac73c1
2 changed files with 2 additions and 1 deletions

View File

@ -839,6 +839,7 @@ lspgen_gen_ospf3_attr(struct lsdb_ctx_ *ctx)
lspgen_store_addr(ext_addr6, attr_template.key.prefix.ipv6_prefix.address, IPV6_ADDR_LEN);
attr_template.key.prefix.ipv6_prefix.len = ctx->ipv6_ext_prefix.len;
attr_template.key.prefix.metric = 100;
attr_template.key.prefix.tag = ext_per_node;
attr_template.key.prefix.ext_flag = true;
attr_template.key.attr_cp[0] = OSPF_MSG_LSUPDATE;
attr_template.key.attr_cp[1] = OSPF_LSA_EXTERNAL6;

View File

@ -1174,7 +1174,7 @@ lspgen_serialize_ospf3_state(lsdb_attr_t *attr, lsdb_packet_t *packet, uint16_t
case OSPF_LSA_EXTERNAL6:
push_be_uint(buf1, 2, lspgen_get_ospf_age(node)); /* LS-age */
push_be_uint(buf1, 2, 0x4005); /* LS-Type */
push_be_uint(buf1, 4, packet->key.id); /* Link State ID */
push_be_uint(buf1, 4, attr->key.prefix.tag); /* Link State ID */
router_id = read_be_uint(node->key.node_id, 4);
push_be_uint(buf1, 4, router_id); /* Advertising Router */
push_be_uint(buf1, 4, node->sequence); /* Sequence */