Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解决重启clash过程中tun设备配置偶尔失败的问题 #1

Open
wants to merge 1 commit into
base: meta
Choose a base branch
from

Conversation

chain710
Copy link

@chain710 chain710 commented Jan 6, 2023

在x86路由环境下clash重启过程中偶尔出现错误:Start TUN listening error: configure tun interface: file exists
问题来源如下

	if len(t.options.Inet4Address) > 0 {
		for _, address := range t.options.Inet4Address {
			addr4, _ := netlink.ParseAddr(address.String())
			err = netlink.AddrAdd(tunLink, addr4)
			if err != nil {
				return err
			}
		}
	}

netlink.AddrAdd不知为何地址已存在

此PR未对addr已存在原因做分析,仅将AddrAdd替换为AddrReplace,可绕过该问题

…Replace

- add more error info to help diagnose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant