2010/4/20 Justin Yaple <yaplej@xxxxxxxxx>: > Hello, > > I am having some trouble figuring out how to re-calculate the tcp/ip > checksums after pulling a packet into user space with > libnetfilter_queue. In a netfilter hook I was able to use this: > tcph->check = 0; > tcph->check = tcp_v4_check(tcph, tcplen, > iph->saddr, > iph->daddr, > csum_partial((char *)tcph, tcplen, 0)); > iph->check = 0; > ip_send_check(iph); //ip checksum > > In user space these functions tcp_v4_check(), csum_partial() and > ip_send_check() do not exists. Are there equivalent functions in user > space so I can recalculate the ip/tcp checksums before passing the new > packet back to the kernel with nfq_set_verdict()? > > Thanks. > -- > To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > Hello Justin! If you solve this problem, I'll be too grateful, because I'm looking for a solution since the last year in order to do NAT in userspace. Good luck. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html