Skip to content

Commit

Permalink
fix: 非windows环境下经常找不到路由的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
XinRoom committed Mar 2, 2023
1 parent bd21ebd commit 18b8620
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/port/syn/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func GetRouterV4(dst net.IP) (srcIp net.IP, srcMac net.HardwareAddr, gw net.IP,
}
}
}
if err != nil {
if err != nil || srcMac == nil {
// 取第一个默认路由
gw, err = gateway.DiscoverGateway()
if err == nil {
Expand Down

0 comments on commit 18b8620

Please sign in to comment.