Skip to contentSkip to conversation

difference of behavior between ip_tables.c and ip6_tables.c in kernel

DISCUSSION Yasuyuki Kozakai 1 participant 1 message Jun 14, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

Hi,

I found that ip6_packet_match() skips AH(Authentication Header) but ip_packet_match() doesn't skip AH. Then "ip6tables -A INPUT -p tcp -j DROP" matches AHed IPv6 packets but "iptables -A INPUT -p tcp -j DROP" doesn't match AHed IPv4 packets.

I think these commands should be behave in the same way. But do you think which behavior is better ?

If skipping AH, we can specify the inner protocol of AH/IPv4. But it is needed to change more codes because tcp_match(), udp_match(), etc. assume that protocol header is next of IPv4 header.

Otherwise, we'll just delete a few code from ip6_packet_match(). But we can't specify inner protocol.

My ideal solution is the former. I think it is better that match() in matching module has "int protoff" argument which points to transport protocol header.

Regards,

-----------------------------------------------------------------
Yasuyuki KOZAKAI @ USAGI Project <[email protected]>