[Xorp-hackers] Question on fea's use of sendmsg
Ben Greear
greearb at candelatech.com
Fri Mar 7 15:25:04 PST 2008
Pavlin Radoslavov wrote:
> Ben Greear <greearb at candelatech.com> wrote:
>
>> I'm seeing a strange problem where the fea attempts to send
>> a packet, the sendmsg returns a correct positive number,
>> but I don't see the packet on the wire.
>>
>> I do see multicast pkts from this same host, and I have set
>> up an independent udp connection between these two interfaces
>> and traffic flows fine (routing & interfaces seem functional.)
>>
>> I can't find anything obvious in the man pages, so I was wondering
>> if any of you have any ideas for what might be happening?
>
> Are you using SO_BINDTODEVICE to bind the socket to a particular
> interface?
Yes.
>
> Also, are those unicast or multicast packets?
multicast seems to work, and *some* unicast work, at least
some of the time (to/from the same sockets/processes). But, some unicast
fail, and they are typically larger packets, though less than MTU.
> One thing you could do is run tcpdump on all possible interfaces
> (including the loopback interface), and see if the packets pops up
> from some unexpected place.
Yep, I should do this...I have only been looking where I expected it
to be :)
Also, I noticed that the sender socket had a large amount of packets
in it's rx buffer because nothing ever reads it. I added code to set
it's rx buflen to only 8k, and I'm now adding logic to read & discard
those packets in case they are somehow jamming up the system due to
consuming too many kernel buffers.
> It is better if you run tcpdump on the XORP host itself to avoid any
> side effects.
> You might also want to watch for some other clues like ARP messages
> (e.g., if the destination is unicast).
Arp looks fine (request & response) seen in tcpdump, and arp tables
look fine.
Thanks for the ideas.
Ben
--
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
More information about the Xorp-hackers
mailing list