Merge "IEEE802.1q Packet returns incorrect header size"
authorAlessandro Boch <aboch@cisco.com>
Fri, 11 Jul 2014 08:14:28 +0000 (08:14 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 11 Jul 2014 08:14:28 +0000 (08:14 +0000)
opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/internal/ArpHandler.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/IEEE8021Q.java

index fe456f3..4efcada 100644 (file)
@@ -695,6 +695,8 @@ public class ArpHandler implements IHostFinder, IListenDataPacket, ICacheUpdateA
             dot1q.setVid(vlan);
             dot1q.setEtherType(EtherTypes.ARP.shortValue());
             dot1q.setPayload(arp);
+            dot1q.setCfi((byte)0);
+            dot1q.setPcp((byte)0);
             ethernet.setEtherType(EtherTypes.VLANTAGGED.shortValue());
             ethernet.setPayload(dot1q);
         }
index 9825d0e..4c0c94c 100644 (file)
@@ -11,6 +11,7 @@ package org.opendaylight.controller.sal.packet;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
+
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.lang3.tuple.Pair;
 import org.opendaylight.controller.sal.match.Match;
@@ -156,4 +157,14 @@ public class IEEE8021Q extends Packet {
         match.setField(MatchType.DL_VLAN_PR, this.getPcp());
         match.setField(MatchType.DL_TYPE, this.getEtherType());
     }
+
+    /**
+     * Gets the header size in bits
+     * @return The .1Q header size in bits
+     */
+    @Override
+    public int getHeaderSize() {
+        return 32;
+    }
+
 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.