+
+/*
+ * Extract TOS bits. Assumes that ipbuf is a valid IPv6 packet.
+ */
+static inline void
+link_socket_extract_tos_v6(struct link_socket *ls, const struct buffer *ipbuf)
+{
+ if (!ls || !ipbuf)
+ {
+ return;
+ }
+
+ struct openvpn_ipv6hdr *ip6h = (struct openvpn_ipv6hdr *)BPTR(ipbuf);
+ ls->ptos = ((ip6h->version_prio & 0x0F) << 4) | (ip6h->flow_lbl[0] >> 4);
+ ls->ptos_defined = true;
}
This looks a bit strange and my test also fails (see below).
Unfortunately, while the patch looks simple enough, I have to NACK it.
The patch does not handle v4 payload to v6 transport in a good way. I
used ping -z 12. It ends up as DSCP 0x0c in the IPv4 payload (as
expected) but ends up as DSCP: 0x00 and flow label 0x90200 in the IPv6
transport packet.
Arne
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel