NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/44412: Appletalk interface addressing problem; fix available



>Number:         44412
>Category:       kern
>Synopsis:       Appletalk packets sent via interface to own address do not 
>loop back
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 18 16:50:00 +0000 2011
>Originator:     David Riley
>Release:        NetBSD 5.0.2 (src from release; still unchanged in CVS)
>Organization:
>Environment:
System: NetBSD beastie-1.foobar 5.0.2 NetBSD 5.0.2 (BEASTIE) #37: Fri Aug 13 
19:05:00 EDT 2010 
oscar%beastie-1.foobar@localhost:/usr/src/sys/arch/macppc/compile/BEASTIE macppc
Architecture: powerpc
Machine: macppc
>Description:
When packets (e.g. name registration packets) are sent via an interface to the 
interface address (e.g. mc0 is appletalk addr 42.42 and a packet is sent to 
42.42), the packet is sent out over the interface (mc0 in this example) instead 
of loopback (inet, for example, is sent over lo0 in a similar case).

Broadcasts have a similar problem; they are not copied to the loopback, and on
occasion, the stack needs to hear its own broadcasts (e.g. for NBP name 
lookups).


>How-To-Repeat:
Install netatalk and start up atalkd.  It will fail to register.  tcpdump will 
show the registration packets going out over the interface, but not being 
received.  Further debugging of the kernel will find the packets going out over 
the external interface but never coming back.

>Fix:
I've fixed the problem and have a patch once it's cleaned up, but I'm not sure 
how to submit it properly other than just pasting the diff in, nor am I sure 
I've gone about this the entirely right way; inet does all this in if_arp in 
the RESOLVE section of arp_rtrequest, whereas I fixed ddp_route to switch the 
ifp for the first case (sending to the interface's own address) to lo0ifp and 
just copy the packet to lo0ifp for the second case (similar to how the IP stack 
does for broadcast/multicast data).

Patch will be made available soon once I've backed out all my debug printf()s 
and made sure it works applied to a clean source tree.



Home | Main Index | Thread Index | Old Index