mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-28 06:40:26 +08:00
完善路由表
This commit is contained in:
@@ -46,6 +46,7 @@ func (r *Router) NextHop(cidr string) *Link {
|
|||||||
return r.table[cidr]
|
return r.table[cidr]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetItem 添加一条表项
|
||||||
func (r *Router) SetItem(ip *net.IPNet, l *Link) {
|
func (r *Router) SetItem(ip *net.IPNet, l *Link) {
|
||||||
r.mu.Lock()
|
r.mu.Lock()
|
||||||
// 从第一条表项开始匹配
|
// 从第一条表项开始匹配
|
||||||
|
|||||||
Reference in New Issue
Block a user