Re: SO_TIMESTAMP vs ICMP6?

[email protected] (Michael van Elst)
Newsgroups gmane.os.netbsd.devel.network
Organization Serpens User Group
Message-ID <[email protected]>
[email protected] (Mouse) writes:

>I'm trying to build a program that sends and receives ICMP6 packets.  I
>want accurate timestamps on the received packets.  So, I turned on
>SO_TIMESTAMP on the socket.

>It didn't work.  recvmsg returned zero bytes of control data.  (It
>works as expected for IPv4.)

>So I tried it on a 9.1 machine I have root access to at work, only to
>find it doesn't work there either.


Looks like a trivial bug, also in -current.

raw_ip.c:

        if (last->inp_flags & INP_CONTROLOPTS ||
            SOOPT_TIMESTAMP(last->inp_socket->so_options))
                ip_savecontrol(last, &opts, ip, n); 

raw_ip6.c:

        if (last->inp_flags & IN6P_CONTROLOPTS)
                ip6_savecontrol(last, &opts, ip6, n);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.