1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-28 06:40:26 +08:00

完善路由表

This commit is contained in:
fumiama
2021-12-28 15:47:21 +08:00
parent a9abad93d3
commit c707e4d90a
7 changed files with 71 additions and 14 deletions

View File

@@ -75,7 +75,7 @@ func (l *Link) Write(p *head.Packet) (n int, err error) {
d, err = p.Marshal(l.me.me.String(), l.peerip.String())
logrus.Debugln("[link] write data", string(d))
if err == nil {
n, err = l.me.myconn.WriteToUDP(d, l.NextHop(l.peerip).endpoint)
n, err = l.me.myconn.WriteToUDP(d, l.me.router.NextHop(l.peerip.String()+"/32").endpoint)
}
return
}