summaryrefslogtreecommitdiffstats
path: root/sbin/route
Commit message (Collapse)AuthorAgeFilesLines
* Fix regression introduced in rev. 173124:mav2009-01-181-26/+27
| | | | | | 0.0.0.0/1 is not the same as 0.0.0.0/0. MFC after: 1 month
* This main goals of this project are:qingli2008-12-151-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. separating L2 tables (ARP, NDP) from the L3 routing tables 2. removing as much locking dependencies among these layers as possible to allow for some parallelism in the search operations 3. simplify the logic in the routing code, The most notable end result is the obsolescent of the route cloning (RTF_CLONING) concept, which translated into code reduction in both IPv4 ARP and IPv6 NDP related modules, and size reduction in struct rtentry{}. The change in design obsoletes the semantics of RTF_CLONING, RTF_WASCLONE and RTF_LLINFO routing flags. The userland applications such as "arp" and "ndp" have been modified to reflect those changes. The output from "netstat -r" shows only the routing entries. Quite a few developers have contributed to this project in the past: Glebius Smirnoff, Luigi Rizzo, Alessandro Cerri, and Andre Oppermann. And most recently: - Kip Macy revised the locking code completely, thus completing the last piece of the puzzle, Kip has also been conducting active functional testing - Sam Leffler has helped me improving/refactoring the code, and provided valuable reviews - Julian Elischer setup the perforce tree for me and has helped me maintaining that branch before the svn conversion
* Fix printing of sockaddr prefixes in verbose mode.ru2008-04-101-1/+1
| | | | | | PR: bin/122403 Submitted by: az MFC after: 3 days
* In route.c in newroute() there's a call to exit(0) if the command wasremko2008-03-221-1/+1
| | | | | | | | | | 'get'. Since rtmsg() always gets called and returns 0 on success and -1 on failure, it's possible to exit with a suitable exit code by calling exit(ret != 0) instead, as is done at the end of newroute(). PR: bin/112303 Submitted by: bruce@cran.org.uk MFC after: 1 week
* Don't mask the address in inet_makenetandmask() according to what classmtm2007-11-041-1/+0
| | | | | | it appears to be in: there is also CIDR. Noticed by: tegge
* Document -t.obrien2007-11-011-0/+4
|
* Fix an error in bit shifting logic for network addresses. The routemtm2007-10-291-20/+24
| | | | | | | | | | | | | | | command would add incorrect routing entries if network numbers weren't fully "spelled" out according to their class. For example: # route add 128.0/16 (works) # route add 128/16 (doesn't work) # route add 193.0.0/24 (works) # route add 193/24 (doesn't work) Also, rework the way a netmask is deduced from network number if it [netmask] is not specified. Submitted by: Nuno Antunes <nuno.antunes@gmail.com> (mostly) MFC after: 1 week
* Obey MK_INET6_SUPPORT.yar2006-07-271-2/+10
| | | | This is also a good chance to apply style.Makefile(5) in some cases.
* Document that -q option is also applicable to the "change" command.ru2005-10-021-2/+2
| | | | | PR: docs/85095 Submitted by: Rostislav Krasny
* Introduce "route del" as an alias to "route delete".tobez2005-09-283-1/+7
| | | | Reviewed by: arch
* - Understand EADDRINUSE, and forget EDQUOT. [1]glebius2005-09-211-2/+6
| | | | | | | | | - Add description for EEXIST. - Change description for ENOBUFS. Routing socket can return this error for many different reasons, including general memory shortage, mbuf memory shortage and rtentry zone. PR: kern/64090 [1]
* - do DNS lookup for symbolic names specified for a destinationume2005-05-231-4/+5
| | | | | | | | | | or gateway. - improves error reporting using gai_strerror(3) instead of printing "bad value". - remove "0" for servname argument for getaddrinfo(3). Submitted by: Andreas Kohn <andreas __at__ syndrom23.de> MFC after: 1 week
* NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 definesume2005-05-131-6/+0
| | | | | NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special for it, now.
* shutdown(2)'s how argument as 0 is nowhere near as cool as SHUT_RDjmallett2005-05-111-2/+2
|
* Expand *n't contractions.ru2005-02-131-1/+1
|
* Sort sections.ru2005-01-181-2/+2
|
* Added the EXIT STATUS section where appropriate.ru2005-01-171-1/+1
|
* Scheduled mdoc(7) sweep.ru2005-01-101-1/+1
|
* Fix markup: .Dv -> .Vabms2004-11-041-2/+2
| | | | | | Update document dates. Prodded by: ru
* Document the fact that blackhole routes normally need to be boundbms2004-11-041-0/+10
| | | | | | | | to lo(4) interfaces to have an effect, and that this is not needed when using IP fast forwarding. Sponsored by: eXtensible Open Router Project <URL:http://www.xorp.org/> MFC after: 3 weeks
* Mechanically kill hard sentence breaks.ru2004-07-021-3/+6
|
* When parsing an argument as an address in getaddr(), heed the -host optionbms2004-06-161-1/+1
| | | | | | | in all cases. The failure mode in the PR is easily reproducible without this patch. PR: bin/43139
* Assorted markup, grammar, and spelling fixes.ru2004-05-171-1/+1
|
* Teach route(8) how to deal with root being in a prison. If prisoncsjp2004-05-071-0/+4
| | | | | | | | | | root is allowed to create raw sockets, then they will be able to create routing sockets, too. However prison-root is not able to manipulate routing tables. So when route(8) attempts to write to a routing socket and recieves EPERM from the kernel, exit rather than moving on with execution. Approved by: bmilekic (mentor)
* Link state change notification of ethernet media to the routing socket.andre2004-05-031-1/+14
| | | | | | | o Print the link state for interface messages in monitor mode. No objections by: sam, wpaul, ru, bms Brucification by: bde
* For both ifconfig and route if we didn't get enough memory from theambrisko2004-04-301-4/+22
| | | | | | | | | | | prior sysctl due to the structure growing between calls try again. Also try again for deleting routes if things fail. We've seen route -f fail this way which does not actually flush all routes. This fixes it. It will whine but it will do the work. PR: 56732 Obtained from: IronPort
* Replace ROUNDUP/ADVANCE with SA_SIZEluigi2004-04-131-8/+4
|
* Remove advertising clause from University of California Regent's license,markm2004-04-092-8/+0
| | | | | | per letter dated July 22, 1999. Approved by: core, imp
* style.Makefile(5):johan2004-02-231-1/+1
| | | | Use WARNS?= instead of WARNS=.
* link-local multicast address must be converted to KAME specificume2003-12-071-1/+1
| | | | | | | embeded scopeid form. Reported by: dwmalone MFC after: 3 days
* Add a describtion for the '-d' flagbrueffer2003-11-101-1/+3
| | | | | | | | While I'm here, add a missing comma PR: 41787 Obtained from: OpenBSD MFC after: 5 days
* Add the -xresolve flag to the route(8) man page.bms2003-09-261-0/+9
| | | | Reviewed by: ru
* LANG->LC_ALLache2003-08-041-1/+1
| | | | Pointed by: ru
* Fix problem differently, use ache2003-08-041-1/+1
| | | | | LANG=C tr 'a-z' 'A-Z'  for hypotetical case that script may generate non-ascii characters
* Use tr '[:lower:]' '[:upper:]' to work with any localeache2003-08-041-1/+1
|
* There is an undocument feature that ``route -vnd flush'' printsru2003-04-161-1/+1
| | | | | a nice dump of the entire routing table. Allow non-root users to see it too.
* Kill #ifdef NS codepeter2003-03-051-110/+0
|
* Since route(8) itself is no longer setuid, we can get a meaningfulkbyanc2003-01-251-1/+1
| | | | | | | | answer for the euid. As a result, fix it such that setuid scripts or programs may call route(8) to do work on their behalf. Reviewed by: ru MFC after: 3 days
* The .Nm utility.charnier2002-07-061-5/+7
|
* Don't have -prefixlen 128 on host routes.ume2002-06-081-8/+5
| | | | Obtained from: KAME
* Avoid construction which results in label at end of block.wollman2002-05-301-2/+6
|
* Respect -q with "add" and "delete". Document who respects -q.ru2002-05-252-31/+36
| | | | PR: bin/38531
* Allow prefix/prefixlen syntax for IPv6 to have consistencyume2002-05-211-15/+22
| | | | with IPv4.
* Have RTF_HOST for /128 destionation.ume2002-05-211-4/+9
|
* Try to guess prefixlen for guessable cases.ume2002-05-201-0/+33
| | | | | | | | - /0 if matches ::/128 - /64 if matches 2000::/3 and lowermost 64 bit is all 0 - /128 if matches 2000::/3 and lowermost 64 bit is non-zero 0 Obtained from: KAME/NetBSD
* Removed the cruft that became cruft after rev. 1.4.ru2002-04-121-5/+1
| | | | Fixed CLEANFILES.
* o remove __Pimp2002-03-211-3/+3
| | | | o remove main prototype
* Remove 'register' keyword.obrien2002-03-201-30/+30
| | | | | | It does not help modern compilers, and some may take some hit from it. (I also found several functions that listed *every* of its 10 local vars with "register" -- just how many free registers do people think machines have?)
* Introduce an interface announcement message for the routingru2002-01-181-1/+24
| | | | | | | | | socket so that routing daemons and other interested parties know when an interface is attached/detached. PR: kern/33747 Obtained from: NetBSD MFC after: 2 weeks
* Default to WARNS=2.obrien2001-12-041-0/+1
| | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike
OpenPOWER on IntegriCloud