更改系统时间导致OpenVPN删除TAP0的地址
我已连接到OpenVPN服务器。(使用-proto tcp,-dev tap,...)在Linux客户端上。 连接效果很好,除非我更改系统时间(例如system(“/bin/date -s xxx”)
,然后 send> send(notings)立即到服务器,Tap0节点有时将被删除,NetLink Monitor将接收RTM_DELADDR
,IF_NAME为TAP0
,这意味着已删除其iPaddress。
我尝试过的内容:
- 连接后,将SYS时间更改为终端(
/bin/date -s xxx
),然后发送(notings)
到服务器。 连接后无法复制 - ,如下呼叫无法复制。
system("/bin/date -s xxx");
sleep(1);//sleep 1s
send(anything);
- 连接后,像下面的呼叫一样,有时可以再现。
system("/bin/date -s xxx");
//sleep(1);//sleep 1s
send(anything);
- 尝试使用不同版本的OpenVPN,获得相同的结果。
我们看不到有关在本地日志文件中删除此节点的任何信息。 所以我的问题是:
- OpenVPN服务器是否删除了该节点或其他任何节点(例如TCP Proto或驱动程序)?
- 为什么删除它?
感谢您的建议。
I have connected to an openvpn server.(with --proto tcp, --dev tap, ...) on a linux client.
Connection works well unless I change the system time like system("/bin/date -s xxx")
and then send(anything)
to server immediately, the tap0 node sometimes will be removed, netlink monitor will receive a RTM_DELADDR
, if_name is tap0
, which means its ipaddress has been deleted.
What I have tried:
- after connected, change sys time on terminal(
/bin/date -s xxx
) thensend(anything)
to server. Cannot reproduce - after connected, call like below, Cannot reproduce.
system("/bin/date -s xxx");
sleep(1);//sleep 1s
send(anything);
- after connected, call like below, Can reproduce sometimes.
system("/bin/date -s xxx");
//sleep(1);//sleep 1s
send(anything);
- try to use different version of openvpn, get the same result.
We don't see any information about deleting this node in our local log file.
So my questions are:
- Did the openvpn server delete this node or any others(like tcp proto or drivers)?
- Why it delete it?
Thanks for any suggestions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
捕获OpenVPN的日志后,会出现ping检查超时错误,然后调用命令:
/sbin/ifconfig tap0 0.0.0.0.0.0.0“
ping检查功能在OpenVPN的主循环中调用,如果发送了一些东西,它将被调用
。 )或
getTimeofday()
,该>取决于系统时间,如果last
是在重置时间之前获得的,而现在是追随它,然后(如果现在和最后一个之间的D值太大)会导致有意义的超时错误。
After catch the log of openvpn, there is a ping check timeout error, and then call the command:
/sbin/ifconfig tap0 0.0.0.0"
The ping check function was called in the main loop of openvpn, and if there is something sent, it will be called.
The ping check function use 2 variable,
last
andnow
, both of them was get fromtime(NULL)
orgettimeofday()
, which depends on the system time, if thelast
was get before the time resetting andnow
was get after it, then(if the D-value between now and last is too large) will cause a timeout error.That make sense, so you can't change the system time of at least Linux at will