Skip to content

Commit

Permalink
rstp: add ability to receive VLAN-tagged BPDUs
Browse files Browse the repository at this point in the history
There are switches which allow to transmit their BPDUs VLAN-tagged.
With this change OVS is able to receive VLAN-tagged BPDUs, but still
transmits its own BPDUs untagged.
This was tested against Westermo RFI-207-F4G-T3G.

Signed-off-by: Matthias May <matthias.may@neratec.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
Matthias May authored and blp committed Feb 22, 2019
1 parent be08459 commit f2f78d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ofproto/ofproto-dpif-xlate.c
Expand Up @@ -1787,7 +1787,11 @@ rstp_process_packet(const struct xport *xport, const struct dp_packet *packet)
dp_packet_set_size(&payload, ntohs(eth->eth_type) + ETH_HEADER_LEN);
}

if (dp_packet_try_pull(&payload, ETH_HEADER_LEN + LLC_HEADER_LEN)) {
int len = ETH_HEADER_LEN + LLC_HEADER_LEN;
if (eth->eth_type == htons(ETH_TYPE_VLAN)) {
len += VLAN_HEADER_LEN;
}
if (dp_packet_try_pull(&payload, len)) {
rstp_port_received_bpdu(xport->rstp_port, dp_packet_data(&payload),
dp_packet_size(&payload));
}
Expand Down

0 comments on commit f2f78d5

Please sign in to comment.