]> git.entuzijast.net Git - imunes.git/commitdiff
Use the (relatively) new policy mechanism for redistributing
authormarko <marko>
Thu, 18 May 2006 17:00:44 +0000 (17:00 +0000)
committermarko <marko>
Thu, 18 May 2006 17:00:44 +0000 (17:00 +0000)
static and connected routes to RIP / RIPng in XORP.

Bug found by:
Submitted by:
Requested by:
Reviewed by:
Approved by:
Obtained from:

xorp.tcl

index 0778a8538736dbf62a45dc63d09aa7fc368176a9..146abe9469293385d5a72b1e1f3a06d6d1218224 100755 (executable)
--- a/xorp.tcl
+++ b/xorp.tcl
@@ -145,7 +145,8 @@ proc $MODULE.cfggen { node } {
     if { [netconfFetchSection $node "router rip"] != "" } {
        lappend cfg "protocols {"
        lappend cfg "    rip {"
-       lappend cfg ""
+       lappend cfg "   export: \"static\""
+       lappend cfg "   export: \"connected\""
        foreach ifc [ifcList $node] {
            set addr "[lindex [split [getIfcIPv4addr $node $ifc] /] 0]"
             if { $addr != "" } {
@@ -165,7 +166,8 @@ proc $MODULE.cfggen { node } {
     if { [netconfFetchSection $node "router ripng"] != "" } {
        lappend cfg "protocols {"
        lappend cfg "    ripng {"
-       lappend cfg ""
+       lappend cfg "   export: \"static\""
+       lappend cfg "   export: \"connected\""
        foreach ifc [ifcList $node] {
            set addr "[lindex [split [getIfcIPv6addr $node $ifc] /] 0]"
             if { $addr != "" } {
@@ -182,6 +184,23 @@ proc $MODULE.cfggen { node } {
        lappend cfg ""
     }
 
+    lappend cfg "policy {"
+    lappend cfg "    policy-statement connected {"
+    lappend cfg "      term export {"
+    lappend cfg "          from {"
+    lappend cfg "              protocol: \"connected\""
+    lappend cfg "          }"
+    lappend cfg "      }"
+    lappend cfg "    }"
+    lappend cfg "    policy-statement static {"
+    lappend cfg "      term export {"
+    lappend cfg "          from {"
+    lappend cfg "              protocol: \"static\""
+    lappend cfg "          }"
+    lappend cfg "      }"
+    lappend cfg "    }"
+    lappend cfg "}"
+
     return $cfg
 }