All of lore.kernel.org
 help / color / mirror / Atom feed
* netfilter6: ICMPv6 type 143 doesn't match
@ 2004-12-25 17:47 Peter Bieringer
  2004-12-27  4:17 ` Yasuyuki Kozakai
  0 siblings, 1 reply; 18+ messages in thread
From: Peter Bieringer @ 2004-12-25 17:47 UTC (permalink / raw)
  To: Maillist netdev, Maillist USAGI-users; +Cc: Harald Welte, Patrick McHardy

Hi,

playing around with DHCPv6 (running on a very secured box with also 
outgoing netfilter ruleset) I found that something's going wrong with the 
ICMPv6 matcher:


LOG rule reports:

Dec 25 18:31:01 gatepbg kernel: OUTPUT-FW6/cleanup:IN= OUT=eth0 
SRC=0000:0000:0000:0000:0000:0000:0000:0000 
DST=ff02:0000:0000:0000:0000:0000:0000:0016 LEN=96 TC=0 HOPLIMIT=1 
FLOWLBL=0 OPT ( ) PROTO=ICMPv6 TYPE=143 CODE=0

I tried several rules (don't wonder about the wrong order, it was a try and 
error -I insert, uppest rule was inserted last):

# ip6tables -vn -L OUTPUT
Chain OUTPUT (policy DROP 4 packets, 4872 bytes)
 pkts bytes target     prot opt in     out     source 
destination
    2   192 ACCEPT     all      *      eth0    ::/0                 ::/0
    0     0 ACCEPT     icmpv6    *      *       ::/0                 ::/0
    0     0 ACCEPT     icmpv6    *      *       ::/0                 ::/0 
ipv6-icmp type 143
    0     0 ACCEPT     icmpv6    *      *       ::/0 
ff02::/16          ipv6-icmp type 143
    0     0 ACCEPT     icmpv6    *      *       ::/0 
ff02::/16          ipv6-icmp type 143
    0     0 ACCEPT     icmpv6    *      *       ::/0 
ff02::16/128       ipv6-icmp type 143

Packet dump:

18:46:07.984044 :: > ff02::16: HBH (rtalert: 0x0000) (padn)[icmp6 sum ok] 
icmp6: type-#143 [hlim 1] (len 56)
        0x0000:  6000 0000 0038 0001 0000 0000 0000 0000  `....8..........
        0x0010:  0000 0000 0000 0000 ff02 0000 0000 0000  ................
        0x0020:  0000 0000 0000 0016 3a00 0502 0000 0100  ........:.......
        0x0030:  8f00 6b6a 0000 0002 0400 0000 ff05 0000  ..kj............
        0x0040:  0000 0000 0000 0000 0001 0003 0400 0000  ................
        0x0050:  ff02 0000 0000 0000 0000 0000 0001 0002  ................

I wonder that only the proto "all" rule matches such packet.


BTW: makes it sense that ip6tables remember, whether I had used "-p all" on 
insert or not?

# ip6tables -I OUTPUT -p all -o eth0     -j ACCEPT
# ip6tables -D OUTPUT  -o eth0     -j ACCEPT
ip6tables: Bad rule (does a matching rule exist in that chain?)
# ip6tables -D OUTPUT -p all -o eth0     -j ACCEPT
(ok)

Same the other way:
# ip6tables -I OUTPUT -o eth0     -j ACCEPT
# ip6tables -D OUTPUT -p all -o eth0     -j ACCEPT
ip6tables: Bad rule (does a matching rule exist in that chain?)

Strange...I didn't really expect such behaviour as "newbie" ;-)

	Peter
-- 
Dr. Peter Bieringer                        http://www.bieringer.de/pb/
GPG/PGP Key 0x958F422D                  mailto: pb at bieringer dot de
Deep Space 6 Co-Founder and Core Member     http://www.deepspace6.net/

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: netfilter6: ICMPv6 type 143 doesn't match
@ 2005-04-25 18:09 Jonathan Wood
  0 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wood @ 2005-04-25 18:09 UTC (permalink / raw)
  To: netfilter-devel

Has there been any progress on this issue? I am seeing it in 2.6.11.7,
and making the change suggested below fixes it for me.

Thanks

> On Sat, Jan 08, 2005 at 12:45:14PM +0100, Peter Bieringer wrote:
> > -               ptr = IPV6_HDR_LEN;
> > +               ptr = ((u8*)skb->nh.raw - skb->data) + IPV6_HDR_LEN;
> [...]
> > But it won't help :-((
>
> The following works for me on 2.6.8:
>
>                 ptr = ((char *) ipv6 - (char *) skb->data) + 
> IPV6_HDR_LEN;
>
> Older 2.6 kernels also do not call ipv6_skip_exthdr() in icmp6_match();
> more recent kernels fix this.
>
> Olaf

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2005-05-06 14:39 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-25 17:47 netfilter6: ICMPv6 type 143 doesn't match Peter Bieringer
2004-12-27  4:17 ` Yasuyuki Kozakai
2004-12-27  9:02   ` YOSHIFUJI Hideaki / 吉藤英明
2005-01-02  9:12     ` netfilter6: ICMPv6 type 143 doesn't match (130 also not) Peter Bieringer
2005-01-08 11:45     ` (usagi-users 03180) Re: netfilter6: ICMPv6 type 143 doesn't match Peter Bieringer
2005-01-09 17:41       ` (usagi-users 03187) " Peter Bieringer
2005-01-10 13:17       ` (usagi-users 03180) " Olaf Kirch
2005-01-11 19:56         ` (usagi-users 03190) " Peter Bieringer
2005-05-05 19:53   ` Patrick McHardy
2005-05-05 20:20     ` Patrick McHardy
2005-05-05 21:34       ` David S. Miller
2005-05-05 22:26     ` David Stevens
2005-05-05 22:32       ` Patrick McHardy
2005-05-05 22:31         ` David S. Miller
2005-05-05 22:50           ` Patrick McHardy
2005-05-06 13:22             ` Herbert Xu
2005-05-06 14:39               ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2005-04-25 18:09 Jonathan Wood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.