Re: Traceroute without s bit

From: Olaf Kirch (okir@caldera.de)
Date: Wed Dec 06 2000 - 10:07:38 EST


On Wed, Dec 06, 2000 at 02:09:05PM +0100, Andi Kleen wrote:
> IP_PKTINFO does not allow to set source addresses, only destination
> addresses. Source address depends on the boundage or the route.

No. At least udp_sendmsg uses the spec_dst_addr field as the source
address. I added some code to my traceroute that lets you select the
source address in order to verify that.

However the good thing is that somewhere something seems to check that
the requested address is indeed one attached to a local interface.

> > 13:43:02 poll([{fd=4, events=POLLERR}], 1, 5) = 0
> > 13:43:02 poll([{fd=4, events=POLLERR}], 1, 5) = 0
> > 13:43:02 poll([{fd=4, events=POLLERR}], 1, 5) = 0
> > 13:43:02 poll([{fd=4, events=POLLERR}], 1, 5) = 0
>
> POLLERR is returned until the error queue is empty. I suspect you're
> not emptying it properly in all cases. It can contain multiple errors.

But it doesn't return POLLERR. If it was returning it, pollfd.revents
would be set. pollfd.events is the event mask that's being passed _into_
the poll() call.

You're right about the IP_RETOPS stuff though. I didn't look closely enough;
ip_cmsg_send does expect raw options.

Thanks,
Olaf

-- 
Olaf Kirch         |  --- o --- Nous sommes du soleil we love when we play
okir@monad.swb.de  |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax
okir@caldera.de    +-------------------- Why Not?! -----------------------
         UNIX, n.: Spanish manufacturer of fire extinguishers.            
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Dec 07 2000 - 21:00:15 EST