aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsotech117 <michael_foiani@brown.edu>2023-10-23 11:21:25 -0400
committersotech117 <michael_foiani@brown.edu>2023-10-23 11:21:25 -0400
commit0cada533358361e760958bae7e9d6fd3f60963b2 (patch)
tree63e1492d2c1cc07626316603d848e376f64a4c65
parentcb605f4bd1868c443799f4764e9400ada2c08eb8 (diff)
fix sending triggeredupdate bug
-rw-r--r--pkg/ipstack/ipstack.go13
-rwxr-xr-xvhostbin3105056 -> 3095666 bytes
-rwxr-xr-xvrouterbin3105056 -> 3095666 bytes
3 files changed, 3 insertions, 10 deletions
diff --git a/pkg/ipstack/ipstack.go b/pkg/ipstack/ipstack.go
index 4556f0f..ddb5b91 100644
--- a/pkg/ipstack/ipstack.go
+++ b/pkg/ipstack/ipstack.go
@@ -879,18 +879,11 @@ func handleRIP(src *Interface, dest *Neighbor, message []byte, hdr *ipv4header.I
timeoutTable[hdr.Src] = 0
mu.Unlock()
}
- continue
+ } else {
+ routingTable[destination] = Hop{entry.cost + 1, "R", src, hdr.Src}
+ triggeredEntries = append(triggeredEntries, RIPEntry{destination, entry.cost + 1})
}
- // fmt.Println("Adding new route to routing table: ", destination.String(), entry.cost)
- // @ david, where did the 17 come from
- //if entry.cost == 17 {
- // routingTable[destination] = Hop{0, "R", src, hdr.Src}
- //} else {
- routingTable[destination] = Hop{entry.cost + 1, "R", src, hdr.Src}
- triggeredEntries = append(triggeredEntries, RIPEntry{destination, entry.cost + 1})
- // }
-
// send out triggered updates
if len(triggeredEntries) > 0 {
sendTriggeredUpdates(triggeredEntries)
diff --git a/vhost b/vhost
index 66761c1..f641013 100755
--- a/vhost
+++ b/vhost
Binary files differ
diff --git a/vrouter b/vrouter
index e62754d..6708802 100755
--- a/vrouter
+++ b/vrouter
Binary files differ