更改系统时间导致OpenVPN删除TAP0的地址

发布于 2025-02-07 09:11:51 字数 854 浏览 2 评论 0原文

我已连接到OpenVPN服务器。(使用-proto tcp,-dev tap,...)在Linux客户端上。 连接效果很好,除非我更改系统时间(例如system(“/bin/date -s xxx”),然后 send> send(notings)立即到服务器,Tap0节点有时将被删除,NetLink Monitor将接收RTM_DELADDR,IF_NAME为TAP0,这意味着已删除其iPaddress。

我尝试过的内容:

  1. 连接后,将SYS时间更改为终端(/bin/date -s xxx),然后发送(notings)到服务器。 连接后无法复制
  2. ,如下呼叫无法复制。
    system("/bin/date -s xxx");
    sleep(1);//sleep 1s
    send(anything);
  1. 连接后,像下面的呼叫一样,有时可以再现。
    system("/bin/date -s xxx");
    //sleep(1);//sleep 1s
    send(anything);
  1. 尝试使用不同版本的OpenVPN,获得相同的结果。

我们看不到有关在本地日志文件中删除此节点的任何信息。 所以我的问题是:

  1. OpenVPN服务器是否删除了该节点或其他任何节点(例如TCP Proto或驱动程序)?
  2. 为什么删除它?

感谢您的建议。

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:

  1. after connected, change sys time on terminal(/bin/date -s xxx) then send(anything) to server. Cannot reproduce
  2. after connected, call like below, Cannot reproduce.
    system("/bin/date -s xxx");
    sleep(1);//sleep 1s
    send(anything);
  1. after connected, call like below, Can reproduce sometimes.
    system("/bin/date -s xxx");
    //sleep(1);//sleep 1s
    send(anything);
  1. 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:

  1. Did the openvpn server delete this node or any others(like tcp proto or drivers)?
  2. Why it delete it?

Thanks for any suggestions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

允世 2025-02-14 09:11:51

捕获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 and now, both of them was get from time(NULL) or gettimeofday(), which depends on the system time, if the last was get before the time resetting and now 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文