Apart from STP, EVB extension of LLDP as well as IEEE 802.1QBG
use the Nearest Customer Bridge (NCB) DMAC which
has a value of 0180.c200.0000. If a flow is programmed for
LLDP or QBG packets specifying the NCB DMAC and ethertype,
the userspace still drops the frame thinking it's a STP
frame. STP BPDU are not encoded in Ethernet II header, but
uses LLC encap and it should contain the length in the
respective field, instead of ethertype. So, the value will
be less than 0x800. An extra check is added to ensure frames with 

NCB DMAC and a valid etype are not treated as STP frames.


Signed-off-by: Padmanabhan Krishnan <kpr...@yahoo.com>
---
 ofproto/ofproto-dpif-xlate.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index 248382f..f5e9a48 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -1820,7 +1820,8 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t 
ofp_port,
         xlate_report(ctx, "OFPPC_NO_FWD set, skipping output");
         return;
     } else if (check_stp) {
-        if (eth_addr_equals(ctx->base_flow.dl_dst, eth_addr_stp)) {
+        if (eth_addr_equals(ctx->base_flow.dl_dst, eth_addr_stp) &&
+            (ntohs(ctx->base_flow.dl_type) < ETH_TYPE_IP)) {
             if (!xport_stp_listen_state(xport)) {
                 xlate_report(ctx, "STP not in listening state, "
                              "skipping bpdu output");
-- 
1.7.9.5
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to