Re: Wrong MAC in redirected packet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jan Engelhardt skrev:
On Thursday 2009-03-26 11:26, Kristian Evensen wrote:
Turned out that it was the checksums. They were calculated correctly,
but since I processed packets on input, tcp_hdr and udp_hdr of course
returned invalid pointers. My code is now more or less RAWNAT, so if
it is of interest to anybody else I will merge them and make it
available.

I have now rebased the RAWNAT branch to Xt-a's master and
made the rawpost tables workable with all kernel versions.
It does not have MAC addr punning yet.
Great, but I think I see a small bug (I left my Linux-machine at work so I am not able to try it out). If you use RAWDNAT in prerouting, tcp_hdr and udp_hdr will return the wrong values since the corresponsing values in the SKB are not set yet. At least, that is what I experienced in my own module. Please let me know if I am wrong :)

Would a better solution by to use conntrack to determine the direction, check the name of the chain (is that possible?) or just simply ip_hdr + 1? :)

-Kristian
--
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

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux