Re: sendmsg and IP_PKTINFO

From: David S. Miller (davem@redhat.com)
Date: Tue Feb 18 2003 - 23:03:53 EST


   From: Neil Brown <neilb@cse.unsw.edu.au>
   Date: Wed, 19 Feb 2003 15:13:48 +1100

   On Tuesday February 18, davem@redhat.com wrote:
> Alexey and myself totally disagree. We have described for you
> the intended purpose of this feature. Please do not try to use
> it in some other way, it may prove to be painful :-)
   
   Thankyou for making that clear.
   
You're very welcome, thank you for tracking all of this down.
   
   Currently the sunrpc/svc_udp.c code asks for an IP_PKTINFO from
   recvmsg, and passes it verbatim down through sendmsg.

And yes, this is buggy.

   My patch checks that the returned data looks believable and, if it
   does, zeros the ipi_ifindex field.

Please note also that ipi_addr is ignored on sendmsg().

You don't have to zero it, this is just a reminder about
what the kernel will do with this thing.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Feb 23 2003 - 22:00:24 EST