Commit 5b8789c3 authored by Shashi Guruprasad's avatar Shashi Guruprasad

Fixed a simple but showstopper bug. This script would flush the routes

in every routing table except the main before inserting new ones
obtained from tmcc. The problem was that even the interface routes
that were added when the interfaces were brought up are flushed.
Unfortunately these routes weren't getting added again.

The solution is to toggle the interfaces i.e. disabling and re-enabling
them again. It has the desired effect of flushing all the routes as well.
I'm not sure how things worked until now. In all my previous mappings
of the testbed/nse10 straight-line topology, things mysteriously worked!
parent 70ff5465
......@@ -349,6 +349,11 @@ if { $simcode_present == 1 } {
exec sysctl -w net.inet.ip.forwarding=0 net.inet.ip.fastforwarding=0
# Disabling and Enabling interfaces so that routes are all
# flushed and we can start cleanly
exec $CLIENTVARDIR/boot/rc.ifc disable
exec $CLIENTVARDIR/boot/rc.ifc enable
# Now, we configure IPTaps for links between real and simulated nodes
set i 0
......@@ -413,12 +418,6 @@ if { $simcode_present == 1 } {
set tbnodename [$srcnode set tbname]
if { [info exists tbroutes($tbnodename)] } {
# We don't wanna be flushing the main
# routing table's routes or we'll be
# cutting off the control net.
if { $rtabid > 0 } {
exec route flush -rtabid $rtabid
}
foreach route $tbroutes($tbnodename) {
set rt [split $route ":"]
set ip [lindex $rt 0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment