Fix the decoding opf BGP AGGREGATOR Attribute when 4 octets AS is enabled
This fixes ONOS-1318

Change-Id: I5681b574c46626e4092439e28d28831499e9562b
diff --git a/apps/routing/src/main/java/org/onosproject/routing/bgp/BgpConstants.java b/apps/routing/src/main/java/org/onosproject/routing/bgp/BgpConstants.java
index 96d74e2..05f9866 100644
--- a/apps/routing/src/main/java/org/onosproject/routing/bgp/BgpConstants.java
+++ b/apps/routing/src/main/java/org/onosproject/routing/bgp/BgpConstants.java
@@ -157,6 +157,12 @@
         private Update() {
         }
 
+        /** BGP AS length. */
+        public static final int AS_LENGTH = 2;
+
+        /** BGP 4 Octet AS length (RFC 6793). */
+        public static final int AS_4OCTET_LENGTH = 4;
+
         /**
          * BGP UPDATE: ORIGIN related constants.
          */
@@ -227,12 +233,6 @@
             /** BGP UPDATE Attributes Type Code AS_PATH. */
             public static final int TYPE = 2;
 
-            /** BGP AS length. */
-            public static final int AS_LENGTH = 2;
-
-            /** BGP 4 Octet AS length (RFC 6793). */
-            public static final int AS_4OCTET_LENGTH = 4;
-
             /** BGP UPDATE AS_PATH Type: AS_SET. */
             public static final int AS_SET = 1;
 
@@ -373,8 +373,11 @@
             /** BGP UPDATE Attributes Type Code AGGREGATOR. */
             public static final int TYPE = 7;
 
-            /** BGP UPDATE Attributes Type Code AGGREGATOR length. */
-            public static final int LENGTH = 6;
+            /** BGP UPDATE Attributes Type Code AGGREGATOR length: 2 octet AS. */
+            public static final int AS2_LENGTH = 6;
+
+            /** BGP UPDATE Attributes Type Code AGGREGATOR length: 4 octet AS. */
+            public static final int AS4_LENGTH = 8;
         }
 
         /**