Check if parent_name is properly set in build_gateway_get_l2_hdr_size routine if tag_request is set 0, since parent_name is mandatory for dynamically allocated VLANID.
Reported-at: https://issues.redhat.com/browse/FDP-38 Fixes: b68753a573cd ("northd: dynamically compute l2 hdr len for check_pkt_larger action") Signed-off-by: Lorenzo Bianconi <[email protected]> --- northd/northd.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/northd/northd.c b/northd/northd.c index 3eaa43f07..b041467a3 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -12282,7 +12282,13 @@ build_gateway_get_l2_hdr_size(struct ovn_port *op) struct ovn_port *localnet_port = peer->od->localnet_ports[i]; const struct nbrec_logical_switch_port *nbsp = localnet_port->nbsp; - if (nbsp && nbsp->n_tag_request > 0) { + if (!nbsp || !nbsp->tag_request) { + continue; + } + + if (nbsp->tag_request[0] || + (nbsp->parent_name && nbsp->parent_name[0])) { + /* Valid tag. */ return VLAN_ETH_HEADER_LEN; } } -- 2.41.0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
