* [Openvpn-devel] [HACK/PATCH] Prioritize TCP ACKs
@ 2005-11-24 21:48 Nielsen
2005-11-26 2:59 ` Florian Weimer
0 siblings, 1 reply; 3+ messages in thread
From: Nielsen @ 2005-11-24 21:48 UTC (permalink / raw)
To: openvpn-devel
[-- Attachment #1: Type: text/plain, Size: 662 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Here's a hack of a patch which puts nice TOS bits on TCP ACK packets.
This allows you to use pf or another firewall to prioritize the
resulting openvpn traffic in the way you normally do over asynchronous
connections.
Certaintly no need to put this in openvpn. Just figured someone else out
there might have run into the same problems.
Cheers,
Nate Nielsen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDhqUue/sRCNknZa8RAoDpAKCI/Fk1EdV49UGY2act8kLnWb0zpACgoLYG
drRf/4s1cX8QrlxcYyfqv+k=
=5Xea
-----END PGP SIGNATURE-----
[-- Attachment #2: openvpn-tcp-tos.patch --]
[-- Type: text/x-patch, Size: 674 bytes --]
diff -rU3 ../openvpn-2.0.orig/socket.h ./socket.h
--- ../openvpn-2.0.orig/socket.h 2005-04-10 21:43:58.000000000 -0600
+++ ./socket.h 2005-08-09 13:23:12.874844376 -0600
@@ -737,6 +737,14 @@
struct openvpn_iphdr *iph = (struct openvpn_iphdr *) BPTR (ipbuf);
ls->ptos = iph->tos;
ls->ptos_defined = true;
+
+ if (iph->protocol == OPENVPN_IPPROTO_TCP)
+ {
+ struct openvpn_tcphdr *tcp = (struct openvpn_tcphdr *) (BPTR(ipbuf) + OPENVPN_IPH_GET_LEN (iph->version_len));
+ if ((tcp->flags & (OPENVPN_TCPH_SYN_MASK | OPENVPN_TCPH_ACK_MASK)) == OPENVPN_TCPH_ACK_MASK &&
+ iph->tot_len <= 80)
+ ls->ptos |= 0x10;
+ }
}
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Openvpn-devel] [HACK/PATCH] Prioritize TCP ACKs
2005-11-24 21:48 [Openvpn-devel] [HACK/PATCH] Prioritize TCP ACKs Nielsen
@ 2005-11-26 2:59 ` Florian Weimer
2005-11-29 21:55 ` Nate Nielsen
0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2005-11-26 2:59 UTC (permalink / raw)
To: Nielsen <nielsen@; +Cc: openvpn-devel
> Here's a hack of a patch which puts nice TOS bits on TCP ACK packets.
> This allows you to use pf or another firewall to prioritize the
> resulting openvpn traffic in the way you normally do over asynchronous
> connections.
I think you have to make those TOS values configurable because their
meaning is no longer standardized (or, more precisely, there are
several standards to choose from).
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Openvpn-devel] [HACK/PATCH] Prioritize TCP ACKs
2005-11-26 2:59 ` Florian Weimer
@ 2005-11-29 21:55 ` Nate Nielsen
0 siblings, 0 replies; 3+ messages in thread
From: Nate Nielsen @ 2005-11-29 21:55 UTC (permalink / raw)
To: Florian Weimer <fw@; +Cc: Nielsen <nielsen@
Florian Weimer wrote:
>>Here's a hack of a patch which puts nice TOS bits on TCP ACK packets.
>>This allows you to use pf or another firewall to prioritize the
>>resulting openvpn traffic in the way you normally do over asynchronous
>>connections.
>
> I think you have to make those TOS values configurable because their
> meaning is no longer standardized (or, more precisely, there are
> several standards to choose from).
It's a patch :) Completely customizeable. I doubt this code would (or
should) be included in openvpn as is.
Cheers,
Nate
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-29 21:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-24 21:48 [Openvpn-devel] [HACK/PATCH] Prioritize TCP ACKs Nielsen
2005-11-26 2:59 ` Florian Weimer
2005-11-29 21:55 ` Nate Nielsen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.