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

Re: Bug#552138: inetutils-ping: ping6 doesn't work on kfreebsd-i386



reassign 552138 libc0.1-dev
retitle 552138 libc0.1-dev: Incorrect ICMP6_FILTER* macros on kFreeBSD
thanks

Hi!

On Fri, 2009-10-23 at 18:07:31 +0200, Axel Beckert wrote:
> Package: inetutils-ping
> Version: 2:1.6-3
> Severity: normal
> Tags: ipv6
> User: debian-bsd@lists.debian.org
> Usertags: kfreebsd
> 
> On kfreebsd-i386, "ping6 ::1" (as well as pinging every other host I
> tried with ping6) exits with return code 1, although the loopback
> interface exists and has ::1 as IPv6 address:
> 
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
>         inet6 ::1 prefixlen 128 
>         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 
>         inet 127.0.0.1 netmask 0xff000000 
> 
> ktrace shows the following error shortly before exiting:
> 
>  85522 ping6    RET   getpid 85522/0x14e12
>  85522 ping6    CALL  socket(0x1c,0x3,0x3a)
>  85522 ping6    RET   socket 3
>  85522 ping6    CALL  setsockopt(0x3,0x3a,0x1,0xbfbfe620,0x20)
                                            ^^^

This is a problem in eglibc, the header <bits/in.h> defines
ICMP6_FILTER to 18 as it should be on kFreeBSD, but to 1 in
<netinet/icmp6.h> which is the one being used by ping6.

Once replaced with the correct code, it does not error out, but it
still does not work, as the ICMP6_FILTER_SETPASS* and
ICMP6_FILTER_SETBLOCK* macros are also wrong, they are inverted,
memsetting 0xff where they should be using 0x0 and setting and
clearing the bits where they should do the reverse.

>  85522 ping6    RET   setsockopt -1 errno 42 Protocol not available
>                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>  85522 ping6    CALL  close(0x3)
>  85522 ping6    RET   close 0
>  85522 ping6    CALL  exit(0x1)
> 
> ping itself works fine.

regards,
guillem


Reply to: