BUG-632: add initial configuration bits for TCP-MD5 35/6635/4
authorRobert Varga <rovarga@cisco.com>
Thu, 1 May 2014 14:30:35 +0000 (16:30 +0200)
committerRobert Varga <rovarga@cisco.com>
Fri, 2 May 2014 05:49:45 +0000 (07:49 +0200)
This patch adds the controller-config bit for tcp-md5 and modifies both
BGP and PCEP configurations to take advantage of it. Since the runtime
support is not universally available, these options are left
deactivated.

Change-Id: I61d455966aada9e0cc68dadab724994ba8dcb794
Signed-off-by: Robert Varga <rovarga@cisco.com>
bgp/controller-config/src/main/resources/initial/31-bgp.xml
bgp/controller-config/src/main/resources/initial/41-bgp-example.xml
pcep/controller-config/src/main/resources/initial/32-pcep.xml
pcep/controller-config/src/main/resources/initial/39-pcep-provider.xml
tcp-md5/controller-config/pom.xml [new file with mode: 0644]
tcp-md5/controller-config/src/main/resources/initial/20-tcpmd5.xml [new file with mode: 0644]
tcp-md5/pom.xml

index a8be9f65eaec552c06d3f80117349731c7d61517..9a83bbb3cd5322526f52a92f38b1873e198f19f2 100644 (file)
                                        <worker-group>
                                                <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-threadgroup</type>
                                                <name>global-worker-group</name>
-                                       </worker-group>
+                    </worker-group>
+
+                    <!--
+                         Uncomment this block to enable TCP MD5 Signature support
+
+                    <md5-channel-factory>
+                        <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-channel-factory</type>
+                        <name>md5-client-channel-factory</name>
+                    </md5-channel-factory>
+
+                    <md5-server-channel-factory>
+                        <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-server-channel-factory</type>
+                        <name>md5-server-channel-factory</name>
+                    </md5-server-channel-factory>
+                    -->
                 </module>
 
                 <module>
index 0bec1a48257c6b65ba044cbec0c3d44ae5ba6eff..3a11bd45dc01d23ce02418075bbc5a01852b1476 100644 (file)
                                                <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-event-executor</type>
                                                <name>global-event-executor</name>
                                        </executor>
-                               </module>
-                               <!--module>
+                </module>
+
+                <!--
+                     A single BGP peer. Note this section is deactivated because a misconfigured peer
+                     tends to log rather nasty error messages.
+
+                     For TCP-MD5 support, make sure the dispatcher associated with the rib has
+                     "md5-channel-factory" attribute set and then add a "password" attribute here.
+                     Note that the peer has to have the same password configured, otherwise the
+                     connection will not be established.
+                               <module>
                                        <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer</type>
                     <name>example-bgp-peer</name>
                     <host>192.0.2.1</host>
@@ -55,7 +64,9 @@
                         <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
                         <name>linkstate</name>
                     </advertized-table>
-                               </module-->
+                </module>
+                -->
+
                                <module>
                                        <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:rib-impl</type>
                                        <name>example-bgp-rib</name>
index 8fc2be47e2f2165b9318b3ba40d7a7fcec3a30dd..a1272e0fe2b81e30bb38f0ca8b3dbb87a0d35aa2 100644 (file)
                         <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-timer</type>
                         <name>global-timer</name>
                     </timer>
+
+                    <!--
+                         Uncomment this block to enable TCP MD5 Signature support
+
+                    <md5-channel-factory>
+                        <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-channel-factory</type>
+                        <name>md5-client-channel-factory</name>
+                    </md5-channel-factory>
+
+                    <md5-server-channel-factory>
+                        <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-server-channel-factory</type>
+                        <name>md5-server-channel-factory</name>
+                    </md5-server-channel-factory>
+                    -->
                 </module>
             </modules>
 
index 1ba20fd17a6b0cab7285b884ed5086501fc4966a..45649f6cceee05debd347d903d96b91bc60a3ce4 100644 (file)
                         <name>stateful07</name>
                     </stateful-plugin>
                     <topology-id>pcep-topology</topology-id>
+
+                    <!--
+                         For TCP-MD5 support make sure the dispatcher has the "md5-server-channel-factory"
+                         attribute set and then set the appropriate client entries here. Note that if this
+                         option is configured, the PCCs connecting here must have the same password configured,
+                         otherwise they will not be able to connect at all.
+                    <client>
+                        <address>192.0.2.2</address>
+                        <password>changeme</password>
+                    </client>
+                    -->
                 </module>
             </modules>
 
diff --git a/tcp-md5/controller-config/pom.xml b/tcp-md5/controller-config/pom.xml
new file mode 100644 (file)
index 0000000..b1697f2
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <scm>
+        <connection>scm:git:ssh://git.opendaylight.org:29418/bgpcep.git</connection>
+        <developerConnection>scm:git:ssh://git.opendaylight.org:29418/bgpcep.git</developerConnection>
+        <url>https://wiki.opendaylight.org/view/BGP_LS_PCEP:Main</url>
+        <tag>HEAD</tag>
+    </scm>
+    <parent>
+        <groupId>org.opendaylight.bgpcep</groupId>
+        <artifactId>tcpmd5-parent</artifactId>
+        <version>0.3.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>tcpmd5-controller-config</artifactId>
+    <description>Controller Configuration files for BGP protocol</description>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <prerequisites>
+        <maven>3.0.4</maven>
+    </prerequisites>
+
+</project>
diff --git a/tcp-md5/controller-config/src/main/resources/initial/20-tcpmd5.xml b/tcp-md5/controller-config/src/main/resources/initial/20-tcpmd5.xml
new file mode 100644 (file)
index 0000000..ccae2b1
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<snapshot>
+    <required-capabilities>
+        <capability>urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:cfg?module=odl-tcpmd5-cfg&amp;revision=2014-04-27</capability>
+        <capability>urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:jni:cfg?module=odl-tcpmd5-jni-cfg&amp;revision=2014-04-27</capability>
+        <capability>urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg?module=odl-tcpmd5-netty-cfg&amp;revision=2014-04-27</capability>
+    </required-capabilities>
+
+    <configuration>
+        <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+            <!--
+                Uncomment this block to enable TCP MD5 Signature support
+
+            <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+                <module>
+                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:jni:cfg">prefix:native-key-access-factory</type>
+                    <name>global-key-access-factory</name>
+                </module>
+
+                <module>
+                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-client-channel-factory</type>
+                    <name>md5-client-channel-factory</name>
+
+                    <key-access-factory>
+                        <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:cfg">prefix:key-access-factory</type>
+                        <name>global-key-access-factory</name>
+                    </key-access-factory>
+                </module>
+
+                <module>
+                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-server-channel-factory-impl</type>
+                    <name>md5-server-channel-factory</name>
+
+                    <server-key-access-factory>
+                        <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:cfg">prefix:key-access-factory</type>
+                        <name>global-key-access-factory</name>
+                    </server-key-access-factory>
+                </module>
+            </modules>
+
+            <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+                <service>
+                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:cfg">prefix:key-access-factory</type>
+                    <instance>
+                        <name>global-key-access-factory</name>
+                        <provider>/modules/module[type='native-key-access-factory'][name='global-key-access-factory']</provider>
+                    </instance>
+                </service>
+
+                <service>
+                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-channel-factory</type>
+                    <instance>
+                        <name>md5-client-channel-factory</name>
+                        <provider>/modules/module[type='md5-client-channel-factory'][name='md5-client-channel-factory']</provider>
+                    </instance>
+                </service>
+
+                <service>
+                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-server-channel-factory</type>
+                    <instance>
+                        <name>md5-server-channel-factory</name>
+                        <provider>/modules/module[type='md5-server-channel-factory-impl'][name='md5-server-channel-factory']</provider>
+                    </instance>
+                </service>
+            </services>
+            -->
+        </data>
+    </configuration>
+</snapshot>
index a1c5cf993b0e61ab3877694937dece79af189f19..163291ed82a82ffb74f199ea360533eb704a686a 100644 (file)
                 <version>${project.version}</version>
                 <type>nar</type>
             </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>tcpmd5-controller-config</artifactId>
+                <version>${project.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>