Bump netty 4.0 to latest release

- 4.0.37 seems to contain security bug-fix
  http://netty.io/news/2016/06/07/4-0-37-Final.html
  All other release notes: http://netty.io/news/

Change-Id: I820c268c0ff58527a43354927dd97ee5431d7b31
diff --git a/features/features.xml b/features/features.xml
index 807b85a..cad8e6a 100644
--- a/features/features.xml
+++ b/features/features.xml
@@ -25,12 +25,12 @@
         <bundle>mvn:commons-configuration/commons-configuration/1.10</bundle>
         <bundle>mvn:com.google.guava/guava/19.0</bundle>
         <bundle>mvn:io.netty/netty/3.10.5.Final</bundle>
-        <bundle>mvn:io.netty/netty-common/4.0.36.Final</bundle>
-        <bundle>mvn:io.netty/netty-buffer/4.0.36.Final</bundle>
-        <bundle>mvn:io.netty/netty-transport/4.0.36.Final</bundle>
-        <bundle>mvn:io.netty/netty-handler/4.0.36.Final</bundle>
-        <bundle>mvn:io.netty/netty-codec/4.0.36.Final</bundle>
-        <bundle>mvn:io.netty/netty-transport-native-epoll/4.0.36.Final</bundle>
+        <bundle>mvn:io.netty/netty-common/4.0.40.Final</bundle>
+        <bundle>mvn:io.netty/netty-buffer/4.0.40.Final</bundle>
+        <bundle>mvn:io.netty/netty-transport/4.0.40.Final</bundle>
+        <bundle>mvn:io.netty/netty-handler/4.0.40.Final</bundle>
+        <bundle>mvn:io.netty/netty-codec/4.0.40.Final</bundle>
+        <bundle>mvn:io.netty/netty-transport-native-epoll/4.0.40.Final</bundle>
         <bundle>mvn:commons-pool/commons-pool/1.6</bundle>
         <bundle>mvn:org.apache.commons/commons-math3/3.6.1</bundle>
 
diff --git a/lib/BUCK b/lib/BUCK
index fa5043e..b6895f5 100644
--- a/lib/BUCK
+++ b/lib/BUCK
@@ -1,4 +1,4 @@
-# ***** This file was auto-generated at Tue Aug 09 11:28:14 PDT 2016. Do not edit this file manually. *****
+# ***** This file was auto-generated at Thu Aug 11 12:54:15 PDT 2016. Do not edit this file manually. *****
 osgi_feature_group(
   name = 'COMPILE',
   visibility = ['PUBLIC'],
@@ -718,46 +718,55 @@
 
 remote_jar (
   name = 'netty-buffer',
-  out = 'netty-buffer-4.0.36.Final.jar',
-  url = 'mvn:io.netty:netty-buffer:jar:4.0.36.Final',
-  sha1 = '9e767120867ed17e72bf764be0578c712887d7ba',
-  maven_coords = 'io.netty:netty-buffer:4.0.36.Final',
+  out = 'netty-buffer-4.0.40.Final.jar',
+  url = 'mvn:io.netty:netty-buffer:jar:4.0.40.Final',
+  sha1 = '9ccf9a1130dbb4a4142febd5d6f68c735a7a059b',
+  maven_coords = 'io.netty:netty-buffer:4.0.40.Final',
   visibility = [ 'PUBLIC' ],
 )
 
 remote_jar (
   name = 'netty-codec',
-  out = 'netty-codec-4.0.36.Final.jar',
-  url = 'mvn:io.netty:netty-codec:jar:4.0.36.Final',
-  sha1 = '6a69fc12c1f6f8ac51465c777de8cac0bbd79ba3',
-  maven_coords = 'io.netty:netty-codec:4.0.36.Final',
+  out = 'netty-codec-4.0.40.Final.jar',
+  url = 'mvn:io.netty:netty-codec:jar:4.0.40.Final',
+  sha1 = 'f6ad91e4884b47c3e7e5faa3732b06e317ab82e1',
+  maven_coords = 'io.netty:netty-codec:4.0.40.Final',
   visibility = [ 'PUBLIC' ],
 )
 
 remote_jar (
   name = 'netty-common',
-  out = 'netty-common-4.0.36.Final.jar',
-  url = 'mvn:io.netty:netty-common:jar:4.0.36.Final',
-  sha1 = 'ebcc1f105f8124434cced21effaf702c16ed7a18',
-  maven_coords = 'io.netty:netty-common:4.0.36.Final',
+  out = 'netty-common-4.0.40.Final.jar',
+  url = 'mvn:io.netty:netty-common:jar:4.0.40.Final',
+  sha1 = 'ef08d9d6fa46f6a937e7a9934030df16f38978ae',
+  maven_coords = 'io.netty:netty-common:4.0.40.Final',
   visibility = [ 'PUBLIC' ],
 )
 
 remote_jar (
   name = 'netty-handler',
-  out = 'netty-handler-4.0.36.Final.jar',
-  url = 'mvn:io.netty:netty-handler:jar:4.0.36.Final',
-  sha1 = '9d10bfcc57bbb39dafd63979805a93fbe1d069da',
-  maven_coords = 'io.netty:netty-handler:4.0.36.Final',
+  out = 'netty-handler-4.0.40.Final.jar',
+  url = 'mvn:io.netty:netty-handler:jar:4.0.40.Final',
+  sha1 = '1d283fea961c27190a520fc841148715f5569a8a',
+  maven_coords = 'io.netty:netty-handler:4.0.40.Final',
   visibility = [ 'PUBLIC' ],
 )
 
 remote_jar (
   name = 'netty-transport',
-  out = 'netty-transport-4.0.36.Final.jar',
-  url = 'mvn:io.netty:netty-transport:jar:4.0.36.Final',
-  sha1 = 'b22c2d243bee4f8183b8a84c9837cff9376f50b3',
-  maven_coords = 'io.netty:netty-transport:4.0.36.Final',
+  out = 'netty-transport-4.0.40.Final.jar',
+  url = 'mvn:io.netty:netty-transport:jar:4.0.40.Final',
+  sha1 = 'ad6890b272eea75185252c85c2927752e221764d',
+  maven_coords = 'io.netty:netty-transport:4.0.40.Final',
+  visibility = [ 'PUBLIC' ],
+)
+
+remote_jar (
+  name = 'netty-transport-native-epoll',
+  out = 'netty-transport-native-epoll-4.0.40.Final.jar',
+  url = 'mvn:io.netty:netty-transport-native-epoll:jar:4.0.40.Final',
+  sha1 = 'd9cb62e87b207ac0e9913023f404b42987671d56',
+  maven_coords = 'io.netty:netty-transport-native-epoll:4.0.40.Final',
   visibility = [ 'PUBLIC' ],
 )
 
@@ -771,15 +780,6 @@
 )
 
 remote_jar (
-  name = 'netty-transport-native-epoll',
-  out = 'netty-transport-native-epoll-4.0.36.Final.jar',
-  url = 'mvn:io.netty:netty-transport-native-epoll:jar:4.0.36.Final',
-  sha1 = 'b60f013a613d8c299e01abb669be14467758dcdf',
-  maven_coords = 'io.netty:netty-transport-native-epoll:4.0.36.Final',
-  visibility = [ 'PUBLIC' ],
-)
-
-remote_jar (
   name = 'catalyst-netty',
   out = 'catalyst-netty-1.1.1.jar',
   url = 'mvn:io.atomix.catalyst:catalyst-netty:jar:1.1.1',
diff --git a/lib/deps.json b/lib/deps.json
index ec9855b..ec745b8 100644
--- a/lib/deps.json
+++ b/lib/deps.json
@@ -151,13 +151,13 @@
     "minimal-json": "mvn:com.eclipsesource.minimal-json:minimal-json:0.9.4",
     "minlog": "mvn:com.esotericsoftware:minlog:1.3.0",
     "netty": "mvn:io.netty:netty:3.10.5.Final",
-    "netty-buffer": "mvn:io.netty:netty-buffer:4.0.36.Final",
-    "netty-codec": "mvn:io.netty:netty-codec:4.0.36.Final",
-    "netty-common": "mvn:io.netty:netty-common:4.0.36.Final",
-    "netty-handler": "mvn:io.netty:netty-handler:4.0.36.Final",
-    "netty-transport": "mvn:io.netty:netty-transport:4.0.36.Final",
+    "netty-buffer": "mvn:io.netty:netty-buffer:4.0.40.Final",
+    "netty-codec": "mvn:io.netty:netty-codec:4.0.40.Final",
+    "netty-common": "mvn:io.netty:netty-common:4.0.40.Final",
+    "netty-handler": "mvn:io.netty:netty-handler:4.0.40.Final",
+    "netty-transport": "mvn:io.netty:netty-transport:4.0.40.Final",
+    "netty-transport-native-epoll": "mvn:io.netty:netty-transport-native-epoll:4.0.40.Final",
     "catalyst-concurrent": "mvn:io.atomix.catalyst:catalyst-concurrent:1.1.1",
-    "netty-transport-native-epoll": "mvn:io.netty:netty-transport-native-epoll:4.0.36.Final",
     "catalyst-netty": "mvn:io.atomix.catalyst:catalyst-netty:1.1.1",
     "catalyst-transport": "mvn:io.atomix.catalyst:catalyst-transport:1.1.1",
     "objenesis": "mvn:org.objenesis:objenesis:2.2",
diff --git a/lib/pom.xml b/lib/pom.xml
index 603971e..e7cb764 100644
--- a/lib/pom.xml
+++ b/lib/pom.xml
@@ -41,7 +41,7 @@
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <onos-build-conf.version>1.3</onos-build-conf.version>
-        <netty4.version>4.0.36.Final</netty4.version>
+        <netty4.version>4.0.40.Final</netty4.version>
         <openflowj.version>0.9.5.onos</openflowj.version>
         <onos-maven-plugin.version>1.10</onos-maven-plugin.version>
         <osgi.version>5.0.0</osgi.version>
diff --git a/protocols/bgp/ctl/pom.xml b/protocols/bgp/ctl/pom.xml
old mode 100755
new mode 100644
index 500a4ea..5ba4e4c
--- a/protocols/bgp/ctl/pom.xml
+++ b/protocols/bgp/ctl/pom.xml
@@ -49,7 +49,6 @@
         <dependency>
             <groupId>io.netty</groupId>
             <artifactId>netty-common</artifactId>
-            <version>4.0.36.Final</version>
         </dependency>
     </dependencies>