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

Very chatty doesn't seem to adhere to beat? #96

Open
iofo opened this issue Apr 1, 2022 · 3 comments
Open

Very chatty doesn't seem to adhere to beat? #96

iofo opened this issue Apr 1, 2022 · 3 comments

Comments

@iofo
Copy link

iofo commented Apr 1, 2022

./glorytun version
0.3.4-51-g32267e8 libsodium 10.3

172.31.92.108:
./glorytun bind dev tun0 keyfile gt.key &
./glorytun path dev tun0 addr 172.38.10.243 to addr 172.31.92.108 set up losslimit 2% beat 1000ms rate auto
ifconfig tun0 10.0.1.2 pointopoint 10.0.1.1 up

172.38.10.243
./glorytun bind dev tun0 keyfile gt.key &
./glorytun path dev tun0 addr 172.31.92.108 to addr 172.38.10.243 set up losslimit 2% beat 1000ms rate auto
ifconfig tun0 10.0.1.1 pointopoint 10.0.1.2 up

the machines are completely idle with no traffic going through the tunnel

as soon as tunnel is established the MTU discovery and BEATS start going over 100 packets a second even though I set beat to 1000ms.

tcpdump -p udp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
16:33:03.001225 IP ip-172-31-92-108.ap-northeast-1.compute.internal.5000 > ip-172-38-10-243.ap-northeast-1.compute.internal.5000: UDP, length 1472
16:33:03.001247 IP ip-172-31-92-108.ap-northeast-1.compute.internal.5000 > ip-172-38-10-243.ap-northeast-1.compute.internal.5000: UDP, length 1472
16:33:03.001294 IP ip-172-38-10-243.ap-northeast-1.compute.internal.5000 > ip-172-31-92-108.ap-northeast-1.compute.internal.5000: UDP, length 1472
16:33:03.001317 IP ip-172-38-10-243.ap-northeast-1.compute.internal.5000 > ip-172-31-92-108.ap-northeast-1.compute.internal.5000: UDP, length 1472
16:33:03.045330 IP ip-172-31-92-108.ap-northeast-1.compute.internal.5000 > ip-172-38-10-243.ap-northeast-1.compute.internal.5000: UDP, length 147
16:33:03.045377 IP ip-172-31-92-108.ap-northeast-1.compute.internal.5000 > ip-172-38-10-243.ap-northeast-1.compute.internal.5000: UDP, length 147
16:33:03.045399 IP ip-172-38-10-243.ap-northeast-1.compute.internal.5000 > ip-172-31-92-108.ap-northeast-1.compute.internal.5000: UDP, length 147
16:33:03.045420 IP ip-172-38-10-243.ap-northeast-1.compute.internal.5000 > ip-172-31-92-108.ap-northeast-1.compute.internal.5000: UDP, length 147
16:33:03.092218 IP ip-172-31-92-108.ap-northeast-1.compute.internal.5000 > ip-172-38-10-243.ap-northeast-1.compute.internal.5000: UDP, length 147
16:33:03.092218 IP ip-172-31-92-108.ap-northeast-1.compute.internal.5000 > ip-172-38-10-243.ap-northeast-1.compute.internal.5000: UDP, length 147
16:33:03.092284 IP ip-172-38-10-243.ap-northeast-1.compute.internal.5000 > ip-172-31-92-108.ap-northeast-1.compute.internal.5000: UDP, length 147
16:33:03.092304 IP ip-172-38-10-243.ap-northeast-1.compute.internal.5000 > ip-172-31-92-108.ap-northeast-1.compute.internal.5000: UDP, length 147
16:33:03.138599 IP ip-172-31-92-108.ap-northeast-1.compute.internal.5000 > ip-172-38-10-243.ap-northeast-1.compute.internal.5000: UDP, length 1472
16:33:03.138627 IP ip-172-31-92-108.ap-northeast-1.compute.internal.5000 > ip-172-38-10-243.ap-northeast-1.compute.internal.5000: UDP, length 1472
16:33:03.138681 IP ip-172-38-10-243.ap-northeast-1.compute.internal.5000 > ip-172-31-92-108.ap-northeast-1.compute.internal.5000: UDP, length 1472
16:33:03.138706 IP ip-172-38-10-243.ap-northeast-1.compute.internal.5000 > ip-172-31-92-108.ap-northeast-1.compute.internal.5000: UDP, length 1472
16:33:03.183990 IP ip-172-31-92-108.ap-northeast-1.compute.internal.5000 > ip-172-38-10-243.ap-northeast-1.compute.internal.5000: UDP, length 147

any ideas why? Is it due to the losslimit so it is probing frequently for that?

Thanks

@angt
Copy link
Owner

angt commented Apr 1, 2022

Hi,
Thanks for the issue :)
You are using an unstable version and the beat option has not been reintegrated (yet).
Also, I recommend you to use the stable version while waiting for the next release.
I will leave the issue open in the meantime, for others.

@iofo
Copy link
Author

iofo commented Apr 3, 2022

Thanks.
I really like some of the new features on master. It looks like you switched from milliseconds to microseconds but didn't update the parsing in argz.c yet. Am I on the right track? if so I will test this properly and pull request.

diff --git a/argz.c b/argz.c
index 58285b4..39bbd76 100644
--- a/argz.c
+++ b/argz.c
@@ -166,13 +166,19 @@ argz_time_suffix(struct argz_ull *ull, const char *s)
     if (!s)
         return 0;
 
+    if (!strcmp(s, "us"))
+        return 0;
+
     if (!strcmp(s, "ms"))
+    {
+        ull->value *= 1000;
         return 0;
+    }
 
     if (s[0] && s[1])
         return -1;
 
-    unsigned long long i = 1;
+    unsigned long long i = 1000;
 
     switch (s[0]) {
         default : return -1;

@iofo
Copy link
Author

iofo commented Apr 6, 2022

I also had a problem that I configured both ends of the tunnel with paths. It really does not like that. Just configuring one end solved the packet rate problem. I still implemented a few fixes in terms of scaling the beat, kxtimeout, keepalive.

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

No branches or pull requests

2 participants