Fix 'route add -host <target> -interface <interface_name>. This was
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 2 Nov 2004 23:49:38 +0000 (23:49 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 2 Nov 2004 23:49:38 +0000 (23:49 +0000)
commit03f869efab284590516c27f21be0d66b03b38955
tree1b43eed644591b8b9a15b729602364d1b9723638
parent03e0f5750cf5e02f3d04afeaf4e29bd4c3808a6b
Fix 'route add -host <target> -interface <interface_name>.  This was
previously adding a static arp entry with the interface's MAC address
instead of the target's address or an incomplete address.  The result is
that the target cannot be routed to.

The fix is to (1) Install the route with 'incomplete' link level info rather
then using the interface's MAC address, (2) Allowing the incomplete address
to be resolved and timeout normally, (3) re-clearing the entry to an
incomplete status instead of destroying it when the ARP times out,
and (4) Making 'arp -d -a' only clear link level routes marked static
instead of deleting them.

Noticed-by: Mikhail Teterin <mi+dragonflybsd@aldan.algebra.com>
sbin/route/route.c
sys/netinet/if_ether.c
usr.sbin/arp/arp.c