aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/vhost/main.go2
-rw-r--r--cmd/vrouter/main.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/cmd/vhost/main.go b/cmd/vhost/main.go
index 3c35792..e83d1bf 100644
--- a/cmd/vhost/main.go
+++ b/cmd/vhost/main.go
@@ -61,7 +61,7 @@ func main() {
messageToSendBytes := []byte(messageToSend)
address, _ := netip.ParseAddr(ipAddr)
- hop, err := ipstack.LongestPrefix(address)
+ hop, err := ipstack.Route(address)
if err != nil {
fmt.Println(err)
continue
diff --git a/cmd/vrouter/main.go b/cmd/vrouter/main.go
index 0bc4d98..bc8cb2b 100644
--- a/cmd/vrouter/main.go
+++ b/cmd/vrouter/main.go
@@ -77,12 +77,12 @@ func main() {
// get the longest prefix match for the destination
address, _ := netip.ParseAddr(ipAddr)
- hop, err := ipstack.LongestPrefix(address)
+ hop, err := ipstack.Route(address)
if err != nil {
fmt.Println(err)
continue
}
-
+
myAddr := hop.Interface.IpPrefix.Addr()
// attempt to send the message to the destination
for _, neighbor := range ipstack.GetNeighbors()[hop.Interface.Name] {