Skip to content

Commit

Permalink
LSPGEN: fix OSPFv3 external prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
GIC-de committed Apr 30, 2024
1 parent 90888fc commit a913ac7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions code/lspgen/src/lspgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion code/lspgen/src/lspgen_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit a913ac7

Please sign in to comment.