Bug 23118

Summary: static link-level route bug?
Product: Base System Reporter: seraf <seraf>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description seraf 2000-11-26 20:50:01 UTC
I add a static link-level route with route(8), and when I look it up with netstat(8), the first octet of the ARP address is missing.  Once this routing table entry is in place, the destination becomes unreachable, and the "use" flag on the entry never increments.

How-To-Repeat: # route add -host 10.20.30.40 -link 0:a:b:c:d:e -iface fxp0 -static
add host 10.20.30.40: gateway 0:a:b:c:d:e
# netstat -nr | grep 10.20.30.40
10.20.30.40        a:b:c:d:e          UHLS        0        0     fxp0
                   ^^^^^^^^^
Comment 1 tmoestl 2000-12-05 23:24:03 UTC
> >Number:         23118
> >Category:       misc
> >Synopsis:       static link-level route bug?
> >Confidential:   no
> >Severity:       non-critical
> >Priority:       low
> >Responsible:    freebsd-bugs
> >State:          open
> >Quarter:        
> >Keywords:       
> >Date-Required:  
> >Class:          sw-bug
> >Submitter-Id:   current-users
> >Arrival-Date:   Sun Nov 26 12:50:01 PST 2000
> >Closed-Date:    
> >Last-Modified:  
> >Originator:     Dominick LaTrappe
> >Release:        4.1-20001102-STABLE
> >Organization:
> >Description:
> I add a static link-level route with route(8), and when I look it up with 
> netstat(8), the first octet of the ARP address is missing.  Once this routing 
> table entry is in place, the destination becomes unreachable, and the "use" 
> flag on the entry never increments.
> >How-To-Repeat:
> # route add -host 10.20.30.40 -link 0:a:b:c:d:e -iface fxp0 -static
This is wrong: -iface does _not_ take an argument (fxp0 is interpretated
as netmask here!). Also, a link address has to be specified
with a leading separator if you do not specify an interface at the start
(see linkaddr(3); this is not documented in route(8)!).
The correct call would be:
	route add -host 10.20.30.40 -link :0:a:b:c:d:e -iface -static
or, if you explicitely want to use fxp0
	route add -host 10.20.30.40 -link fxp0:0:a:b:c:d:e -iface -static

HTH,

	- thomas
Comment 2 ru freebsd_committer freebsd_triage 2001-06-07 15:22:44 UTC
State Changed
From-To: open->closed

Asked and answered.