X-Git-Url: http://sjero.net/git/?p=dccp2tcp;a=blobdiff_plain;f=encap.c;h=beafa6814466b57b5887e13e445f9cae730bdcc9;hp=b932bda706b1b04fdf56d150f5437e4e7e474fa5;hb=1bbfe6080ec64a1d292d863935dc18fec3c6373f;hpb=62022bc31bf0909a04349bd05aedc5546f6d0550 diff --git a/encap.c b/encap.c index b932bda..beafa68 100644 --- a/encap.c +++ b/encap.c @@ -78,6 +78,8 @@ int ethernet_encap(struct packet *new, const struct const_packet *old) /*Select Next Protocol*/ switch(ntohs(ethh->ether_type)){ case ETHERTYPE_IP: + nnew.h=new->h; + nold.h=old->h; if(!ipv4_encap(&nnew, &nold)){ return 0; } @@ -132,6 +134,8 @@ int ipv4_encap(struct packet *new, const struct const_packet *old) switch(iph->protocol){ case 0x21: /*DCCP*/ + nnew.h=new->h; + nold.h=old->h; nnew.src_id=iph->saddr; nnew.dest_id=iph->daddr; if(!convert_packet(&nnew, &nold)){ @@ -200,6 +204,8 @@ int linux_cooked_encap(struct packet *new, const struct const_packet *old) /*Select Next Protocol*/ switch(ntohs(slh->sll_protocol)){ case ETHERTYPE_IP: + nnew.h=new->h; + nold.h=old->h; if(!ipv4_encap(&nnew, &nold)){ return 0; }