From: Samuel Jero Date: Tue, 5 Feb 2013 22:31:44 +0000 (-0500) Subject: IPv6 encapsulation bugfix X-Git-Url: http://sjero.net/git/?p=dccp2tcp;a=commitdiff_plain;h=d4e8f9301a46e196dd8090595b8aae1a04d2a42a IPv6 encapsulation bugfix --- diff --git a/encap.c b/encap.c index f583f09..4cda535 100644 --- a/encap.c +++ b/encap.c @@ -19,12 +19,6 @@ along with this program. If not, see . Author: Samuel Jero Date: 11/2012 - -Notes: - 1)CCID2 ONLY - 2)DCCP MUST use 48 bit sequence numbers - 3)DCCP DATA packets are not implemented (Linux doesn't use them) - 4)DCCP Ack packets show up as TCP packets containing one byte ******************************************************************************/ #include "dccp2tcp.h" #include "encap.h" @@ -192,7 +186,7 @@ int ipv6_encap(struct packet *new, const struct const_packet *old) } /*Adjust IPv6 header to account for packet's total length*/ - iph->ip6_ctlun.ip6_un1.ip6_un1_plen=htons(new->length); + iph->ip6_ctlun.ip6_un1.ip6_un1_plen=htons(nnew.length); /*Adjust length*/ new->length=nnew.length + sizeof(struct ip6_hdr); diff --git a/encap.h b/encap.h index 018acc8..5628f79 100644 --- a/encap.h +++ b/encap.h @@ -19,13 +19,6 @@ along with this program. If not, see . Author: Samuel Jero Date: 11/2012 - -Notes: - 1)CCID2 ONLY - 2)DCCP MUST use 48 bit sequence numbers - 3)Checksums are not computed (they are zeroed) - 4)DCCP DATA packets are not implemented (Linux doesn't use them) - 5)DCCP Ack packets show up as TCP packets containing one byte ******************************************************************************/ #ifndef ENCAP_H_ #define ENCAP_H_