Bug 43139

Summary: /sbin/route -host option doesn't always suffice
Product: Base System Reporter: Tom Pavel <pavel>
Component: binAssignee: Bruce M Simpson <bms>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Tom Pavel 2002-09-20 20:10:02 UTC
	The /sbin/route command tries to be clever about guessing
	whether arguments are hosts or nets.  It uses Class A/B/C
	prefixes as heuristics for this.  Much of this is for
	backwards compatibility.

	Nowadays, CIDR addressing is widespread.  With local netmasks
	that are more than 8 bits, it is quite possible to end up with
	addresses that fail the heuristics.  Therefore, the route
	command provides -net and -host options to force the decision.
	Unfortunately, the -host option does not succeed in the case
	of an address like A.B.C.0, where A is in the Class C space.

How-To-Repeat: 
	transam2[269] # route -n get -host 203.2.3.0
	route: writing to routing socket: No such process
Comment 1 Bruce M Simpson freebsd_committer freebsd_triage 2003-11-25 16:43:28 UTC
Responsible Changed
From-To: freebsd-bugs->bms

I'm in hoover up network PRs mode. I'll look into this.
Comment 2 Bruce M Simpson freebsd_committer freebsd_triage 2003-11-27 10:20:25 UTC
State Changed
From-To: open->analyzed

This looks like a fairly minor nit and could be committed without 
too much hassle. The failure case within the PR is easily reproducible. 

I will commit this once the present freeze has lifted.
Comment 3 Bruce M Simpson freebsd_committer freebsd_triage 2004-06-16 07:29:41 UTC
State Changed
From-To: analyzed->patched

Committed to HEAD, thanks!
Comment 4 Bruce M Simpson freebsd_committer freebsd_triage 2005-12-13 00:55:52 UTC
State Changed
From-To: patched->closed

-CURRENT is now -STABLE