if { $str == "" } {
return 1
}
+ set str [string trimleft $str 0]
if { ![string is integer $str] } {
return 0
}
# value by the installation script.
#
-set LIBDIR lib/imunes
-set ROOTDIR /usr/local
+set LIBDIR ""
+set ROOTDIR "."
source "$ROOTDIR/$LIBDIR/linkcfg.tcl"
source "$ROOTDIR/$LIBDIR/nodecfg.tcl"
if { ![checkIPv4Addr [lindex [split $str /] 0]]} {
return 0
}
- set net [lindex [split $str /] 1]
- if { [string length [string trim $net]] != [string length $net] } {
+ set net [string trim [lindex [split $str /] 1]]
+ if { [string length $net] == 0 } {
return 0
}
return [checkIntRange $net 0 32]
if { ![checkIPv6Addr [lindex [split $str /] 0]]} {
return 0
}
- set net [lindex [split $str /] 1]
- if { [string length [string trim $net]] != [string length $net] } {
+ set net [string trim [lindex [split $str /] 1]]
+ if { [string length $net] == 0 } {
return 0
}
return [checkIntRange $net 0 128]
lappend cfg "protocols {"
lappend cfg " ripng {"
lappend cfg " /* export: \"connected\" */"
- lappend cfg " }"
lappend cfg ""
foreach ifc [ifcList $node] {
set addr "[lindex [split [getIfcIPv6addr $node $ifc] /] 0]"