Re: Wrong MAC in redirected packet

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

 



On Wednesday 2009-03-25 16:00, Kristian Evensen wrote:

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

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

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