Skip to contentSkip to conversation

Problems writing a costum target

DISCUSSION Wim Van de Meerssche 1 participant 1 message Feb 2, 2005 netfilter

lore
Share & tools
lore
#0 lore raw

Hi,

I'm having some trouble writing a new Netfilter target.
It's meant to make some changes to IPv6 packets (add a routing header). However, I can't even get a simple change of IPv6 destination address to work. Either the changes to the packet are ignored (if I use skb_ip_make_writable), or the packet gets dropped somewhere (if I don't use skb_ip_make_writable).

I've been testing with:
ip6tables -t mangle -A POSTROUTING -s somehost -j LOG
ip6tables -t mangle -A POSTROUTING -s somehost -j ADDRH (see attached code) ip6tables -t mangle -A POSTROUTING -s somehost -j LOG (the dropped packets mentioned above don't show up here)

I've also tried the PREROUTING hook.
The code I'm using is attached.
What am I doing wrong? (Is my poor experience with kernel programming to blame?)

Any help would be greatly appreciated.

Wim Van de Meerssche