[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0902270049440.7158@asgard.lang.hm>
Date: Fri, 27 Feb 2009 01:10:24 -0800 (PST)
From: david@...g.hm
To: linux-kernel <linux-kernel@...r.kernel.org>
Subject: ip_nonlocal_bind and sendto
I've got a need to forge the source IP of UDP packets (a stupid syslog
receiver app that I need to deal with)
I know that this can be done with raw sockets, but with the
IP_nonlocal_bind option I thought that it may be possible to do this
without dealing with raw sockets
so I have an app that does the socket call, followed by the bind call
without any errors, but when I issue the sendto call it generates error 22
(invalid parameter) if the source IP doesn't exist on the local box
somewhere.
is this the kernel that is doing whatever check is failing? or is glibc
wrapping the kernel syscall and doing some additional checking?
if it is the kernel that's throwing the error, is there some way of
disabling this check? or do I have to go to raw sockets?
David Lang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists