Re: Wrong MAC in redirected packet

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

 



>>>>My theory is that the original MAC-address is somehow added to the SKB
>>>>before it reaches the output-part of the RAW-table (which is where I
>>>>hook in),
>>>
>>> Routing is done before rawpost, yes, but before the (traditional) raw table.
>>> (it's in skb->dst)
>>
>>Ok, I assumed that the MAC-header was added at a lower layer, but that
>>was then wrong? For some reason I have always though skb->dst was the
>>IP-adress, I will look into that field.
>
> skb->dst contains the pointer to the neighbor (simply put), and a
> neighbor is (also simplified) what you see in `ip neigh`, i.e. MAC

Thanks.

>>After struggling a bit with the compilation (I had to remove the
>>iptable_rawpost.o ip6table_rawpost.o in Kbuild or the compiler
>>complained that it couldn't find the files), I get this error when I
>>try to use it:
>>
>>kristrev@mylatop:~/src/xtables-addons-1.12$ sudo iptables -A
>>PREROUTING -t raw -p udp -d 192.168.101.14 --dport 9999 -j RAWDNAT
>>--to-destination 192.168.100.250
>>iptables: Invalid argument
>
> See `dmesg` for the details of EINVAL.

[22480.722995] xt_RAWNAT may only be used in the "raw" or "rawpost" table.

When outputting the name of the table, I see that it is corrupted. I
tried to change the _check-function to use the new signature, but then
I got compilation-errors from the register-functions. I am using the
version of RAWNAT I found here [1] (please let me know if there is a
more recent one) and xtables-1.12.

-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