summaryrefslogtreecommitdiff
path: root/ofproto
diff options
context:
space:
mode:
authorMatthias May <matthias.may@neratec.com>2019-02-15 00:16:14 +0100
committerBen Pfaff <blp@ovn.org>2019-02-22 15:11:50 -0800
commitf2f78d5c8c8cb5294dbb2c90c7e5e3b15620f46a (patch)
treec480d0a0efe88b686de4028bdfbcc2ab1268030f /ofproto
parentbe084595769412c9621abe2336d7de3ef0f5f351 (diff)
downloadopenvswitch-f2f78d5c8c8cb5294dbb2c90c7e5e3b15620f46a.tar.gz
rstp: add ability to receive VLAN-tagged BPDUs
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>
Diffstat (limited to 'ofproto')
-rw-r--r--ofproto/ofproto-dpif-xlate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index acd4817c2..81b72be37 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -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));
}