lappend cfg "}"
lappend cfg ""
- lappend cfg "fea {"
- lappend cfg "}"
- lappend cfg ""
-
lappend cfg "protocols {"
lappend cfg " static {"
foreach rte [getStatIPv4routes $node] {
set dest [lindex $rte 0]
set gw [lindex $rte 1]
set metric [lindex $rte 2]
- if { $metric == "" } {
- set metric 0
- }
lappend cfg " route4 $dest {"
lappend cfg " next-hop: $gw"
- lappend cfg " metric: $metric"
+ if { $metric != "" } {
+ lappend cfg " metric: $metric"
+ }
lappend cfg " }"
}
foreach rte [getStatIPv6routes $node] {
set dest [lindex $rte 0]
set gw [lindex $rte 1]
set metric [lindex $rte 2]
- if { $metric == "" } {
- set metric 0
- }
lappend cfg " route6 $dest {"
lappend cfg " next-hop: $gw"
- lappend cfg " metric: $metric"
+ if { $metric == "" } {
+ lappend cfg " metric: $metric"
+ }
lappend cfg " }"
}
lappend cfg " }"
lappend cfg "protocols {"
lappend cfg " rip {"
lappend cfg " export static {"
- lappend cfg " metric: 1"
- lappend cfg " tag: 0"
lappend cfg " }"
lappend cfg " export connected {"
- lappend cfg " metric: 1"
- lappend cfg " tag: 0"
lappend cfg " }"
lappend cfg ""
foreach ifc [ifcList $node] {
lappend cfg "protocols {"
lappend cfg " ripng {"
lappend cfg " export static {"
- lappend cfg " metric: 1"
- lappend cfg " tag: 0"
+ lappend cfg " }"
+ lappend cfg " export connected {"
lappend cfg " }"
lappend cfg ""
foreach ifc [ifcList $node] {