Subject: SO_DONTROUTE clashes with arpresolve(9)
To: None <tech-net@netbsd.org>
From: David Young <dyoung@ojctech.com>
List: tech-net
Date: 11/19/2002 21:39:18
arpresolve(9) negates the effect I expect from SO_DONTROUTE when I try
to send a packet to a host with a non-local route. E.g.,

  # warning: do not run this before you read the whole e-mail
  ifconfig tlp0 inet 63.146.38.214/27
  route add -host 63.146.38.211 63.146.38.208
  ping -rn 63.146.38.211

makes the kernel log this:

  Nov 19 20:49:59 noam /netbsd: arplookup: unable to enter address for 63.146.38.211@01:01:e3:f5:3f:92:26:d6 on (null) (host is not on local network)
  Nov 19 20:49:59 noam /netbsd: arpresolve: can't allocate llinfo on tlp0 for 63.146.38.211

No ping reply is ever received, because no ping requests are ever sent,
because ARP never sends a request for 63.146.38.211. Darn.

(There is a worse bug than that: if you run the commands above, your
kernel will panic.  I will commit my one-line fix momentarily.)

This bug has an enormous impact on the multi-hop wireless network I am
building, so I urgently need to fix it. If you have any suggestions for
a fix, I am all ears.

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Engineering from the Right Brain
                        Urbana, IL * (217) 278-3933