lkml.org 
[lkml]   [2000]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Traceroute without s bit
On Wed, Dec 06, 2000 at 04:07:38PM +0100, Olaf Kirch wrote:
> 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.

Please read the code again.

It uses spec_dst to select the possibly policy sourced route -- the
actual source address is only set from that route (either default or what
was set using ip route's from flag) or the bound address.



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

That's not actually checked, but in most simple routing configurations it is
true.


>
> > > 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.

Right. I missed your 5ms timeout @)

-Andi
-
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/

\
 
 \ /
  Last update: 2005-03-22 12:51    [W:0.055 / U:4.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site