From 31c330838aaa247fd7b156b020df2ce95858f8e1 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 9 May 2008 18:52:28 +0000 Subject: small cleanup --- src/linux/tunDevice.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/linux/tunDevice.cpp') diff --git a/src/linux/tunDevice.cpp b/src/linux/tunDevice.cpp index 24bad02..446df4f 100644 --- a/src/linux/tunDevice.cpp +++ b/src/linux/tunDevice.cpp @@ -117,10 +117,10 @@ int TunDevice::write(u_int8_t* buf, u_int32_t len) struct iphdr *hdr = reinterpret_cast(buf); tpi.flags = 0; - if(hdr->version == 6) - tpi.proto = htons(ETH_P_IPV6); - else + if(hdr->version == 4) tpi.proto = htons(ETH_P_IP); + else + tpi.proto = htons(ETH_P_IPV6); iov[0].iov_base = &tpi; iov[0].iov_len = sizeof(tpi); -- cgit v1.2.3