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

完善路由表

This commit is contained in:
fumiama
2021-12-28 15:47:52 +08:00
parent c707e4d90a
commit d05d6d9a9e

View File

@@ -46,6 +46,7 @@ func (r *Router) NextHop(cidr string) *Link {
return r.table[cidr]
}
// SetItem 添加一条表项
func (r *Router) SetItem(ip *net.IPNet, l *Link) {
r.mu.Lock()
// 从第一条表项开始匹配