Commit Graph

146 Commits

Author SHA1 Message Date
Gleb Smirnoff
23454ad0e2 Remove remnants of classful addressing. These magic transformations
of supplied arguments is not what a modern sysadmin expect.
2012-11-14 08:05:21 +00:00
Hiroki Sato
87a688aaa1 Fix a possible infinite loop in "route flush" on 64-bit archs.
MFC after:	3 days
2012-02-04 17:53:22 +00:00
Hajimu UMEMOTO
324930d7f8 Handle the internal scope address representation of the KAME IPv6
stack for the node-local multicast address.

Spotted by:	Rainer Bredehorn <Bredehorn__at__gmx.de>
MFC after:	1 week
2012-01-07 09:01:19 +00:00
Gleb Smirnoff
8d5fa60980 - Fix array bounds checking. [1]
- Add message length checking.

PR:		151664 [1]
Submitted by:	Alexey Illarionov <littlesavage rambler.ru> [1]
Reviewed by:	yar
2010-12-08 15:12:37 +00:00
Gleb Smirnoff
82641e1d1a Add RTM_IEEE80211 to array of route message descriptions.
PR:		151664
Submitted by:	Alexey Illarionov <littlesavage rambler.ru>
2010-12-08 15:10:27 +00:00
Ulrich Spörlein
f62e48f536 route(8): make WARNS=3 clean
- add static and const where appropriate
- check pointers against NULL
- minor styling nits
- it is actually WARNS=6 clean for non-strict alignment platforms

This is shamelessly stolen from DragonflyBSD and reduces our diff.

PR:		bin/140078
Approved by:	ed (co-mentor)
2010-02-27 10:18:33 +00:00
Philippe Charnier
80469c1b25 ANSIfy functions declarations, adjust prototypes. Rename local variable
to not conflict with err().
2009-08-25 04:09:09 +00:00
Kip Macy
427ac07f05 Extend route command:
- add show as alias for get
	- add weights to allow mpath to do more than equal cost
	- add sticky / nostick to disable / re-enable per-connection load balancing

This adds a field to rt_metrics_lite so network bits of world will need to be re-built.

Reviewed by:	jeli & qingli
2009-04-14 23:05:36 +00:00
Randall Stewart
5412227e19 Fix broken case where caused by last patch where
a user uses 0.0.0.0/0 as an alias for default.
Obtained from:	Mykola Dzham (freebsd@levsha.org.ua)
2009-04-11 10:08:26 +00:00
Randall Stewart
5695251a13 Ok, looking at the solution a bit closer, the level
calculation was too agressive. Instead we should only
look at each nibble. This makes it so we make
10.2.0.0 become 10.2/16 NOT 10.2/17.

Need to explore the non-cidr address issue. The two
may not be seperable..

MFC after:	1 week
2009-04-06 14:27:28 +00:00
Randall Stewart
7f749ed938 Class based addressing went out in the early 90's. Basically
if a entry is not route add -net xxx/bits then we should use
the addr (xxx) to establish the number of bits by looking at
the first non-zero bit. So if we enter
route add -net 10.1.1.0 10.1.3.5
this is the same as doing
route add -net 10.1.1.0/24
Since the 8th bit (zero counting) is set to 1 we set bits
to 32-8.

Users can of course still use the /x to change this behavior
or in cases where the network is in the trailing part
of the address, a "netmask" argument can be supplied to
override what is established from the interpretation of the
address itself. e.g:

route add -net 10.1.1.8 -netmask 0xff00ffff

should overide and place the proper CIDR mask in place.

PR:		131365
MFC after:	1 week
2009-04-06 10:09:20 +00:00
Alexander Motin
b814ca8a4f Fix regression introduced in rev. 173124:
0.0.0.0/1 is not the same as 0.0.0.0/0.

MFC after:	1 month
2009-01-18 11:38:35 +00:00
Qing Li
6e6b3f7cbc This main goals of this project are:
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
2008-12-15 06:10:57 +00:00
Ruslan Ermilov
d4f2098b47 Fix printing of sockaddr prefixes in verbose mode.
PR:		bin/122403
Submitted by:	az
MFC after:	3 days
2008-04-10 12:16:20 +00:00
Remko Lodder
6764f54349 In route.c in newroute() there's a call to exit(0) if the command was
'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
2008-03-22 12:50:43 +00:00
Mike Makonnen
5ab965347e Don't mask the address in inet_makenetandmask() according to what class
it appears to be in: there is also CIDR.

Noticed by: tegge
2007-11-04 11:12:40 +00:00
Mike Makonnen
530378f8b9 Fix an error in bit shifting logic for network addresses. The route
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
2007-10-29 00:08:24 +00:00
Anton Berezin
064b93d5ea Introduce "route del" as an alias to "route delete".
Reviewed by:	arch
2005-09-28 12:12:15 +00:00
Gleb Smirnoff
7278e14c38 - Understand EADDRINUSE, and forget EDQUOT. [1]
- 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]
2005-09-21 12:24:46 +00:00
Hajimu UMEMOTO
c60a8b32a2 - do DNS lookup for symbolic names specified for a destination
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
2005-05-23 14:12:32 +00:00
Hajimu UMEMOTO
4f10131848 NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 defines
NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special
for it, now.
2005-05-13 16:31:11 +00:00
Juli Mallett
b894acfb2a shutdown(2)'s how argument as 0 is nowhere near as cool as SHUT_RD 2005-05-11 02:50:41 +00:00
Bruce M Simpson
3a7d7a8b39 When parsing an argument as an address in getaddr(), heed the -host option
in all cases.  The failure mode in the PR is easily reproducible without
this patch.

PR:		bin/43139
2004-06-16 06:29:41 +00:00
Christian S.J. Peron
9251dd77ca Teach route(8) how to deal with root being in a prison. If prison
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)
2004-05-07 15:33:17 +00:00
Andre Oppermann
9063f422e2 Link state change notification of ethernet media to the routing socket.
o Print the link state for interface messages in monitor mode.

No objections by:	sam, wpaul, ru, bms
Brucification by:	bde
2004-05-03 16:30:32 +00:00
Doug Ambrisko
41b0ee744a For both ifconfig and route if we didn't get enough memory from the
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
2004-04-30 22:34:12 +00:00
Luigi Rizzo
0b46c08590 Replace ROUNDUP/ADVANCE with SA_SIZE 2004-04-13 11:24:43 +00:00
Mark Murray
4c723140a4 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp
2004-04-09 19:58:40 +00:00
Hajimu UMEMOTO
711eaadb3c link-local multicast address must be converted to KAME specific
embeded scopeid form.

Reported by:	dwmalone
MFC after:	3 days
2003-12-07 11:11:26 +00:00
Ruslan Ermilov
1becd59e62 There is an undocument feature that ``route -vnd flush'' prints
a nice dump of the entire routing table.  Allow non-root users
to see it too.
2003-04-16 12:06:53 +00:00
Peter Wemm
059c32d2eb Kill #ifdef NS code 2003-03-05 19:18:05 +00:00
Kelly Yancey
ed92abc56b Since route(8) itself is no longer setuid, we can get a meaningful
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
2003-01-25 01:28:11 +00:00
Hajimu UMEMOTO
56c5d32d37 Don't have -prefixlen 128 on host routes.
Obtained from:	KAME
2002-06-08 19:49:22 +00:00
Garrett Wollman
5c7417c4d1 Avoid construction which results in label at end of block. 2002-05-30 21:41:42 +00:00
Ruslan Ermilov
999ffea58a Respect -q with "add" and "delete". Document who respects -q.
PR:		bin/38531
2002-05-25 12:51:34 +00:00
Hajimu UMEMOTO
720bbc8244 Allow prefix/prefixlen syntax for IPv6 to have consistency
with IPv4.
2002-05-21 18:11:31 +00:00
Hajimu UMEMOTO
188450c746 Have RTF_HOST for /128 destionation. 2002-05-21 11:43:53 +00:00
Hajimu UMEMOTO
5818927a00 Try to guess prefixlen for guessable cases.
- /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
2002-05-20 15:01:19 +00:00
Warner Losh
d476a036e2 o remove __P
o remove main prototype
2002-03-21 13:20:49 +00:00
David E. O'Brien
3d438ad61f Remove 'register' keyword.
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?)
2002-03-20 17:55:10 +00:00
Ruslan Ermilov
7b6edd044b Introduce an interface announcement message for the routing
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
2002-01-18 14:33:04 +00:00
Ruslan Ermilov
5acabd8cdd Bring in latest CSRG revisions to this file. 2001-10-17 09:11:23 +00:00
Ruslan Ermilov
162c0b2eff Synch with NetBSD and OpenBSD.
Allow non-superuser to open, listen to, and send safe commands on the
routing socket.  Superuser priviledge is required for all commands
but RTM_GET.

Lose `setuid root' bit of route(8).

Reviewed by:	wollman, dd
2001-08-31 12:31:09 +00:00
Brian Somers
9cfe90fe1f Handle snprintf() returning < 0 (not just -1)
MFC after:	2 weeks
2001-08-20 14:53:05 +00:00
Brian Somers
327e849ae1 Handle snprintf() returning -1.
MFC after:	2 weeks
2001-08-20 12:56:45 +00:00
Ruslan Ermilov
1ce90245fb Due to the documented bug in inet_aton(3), it wasn't possible
to use 0xffffffff (INADDR_NONE) as a netmask value.  The fix
is to use inet_addr(3) which doesn't suffer from this problem.

PR:		bin/28873

Also, while here, fixed the bug when netmask value was ignored
(RTF_HOST flag was set) if the "destination gateway netmask"
syntax is used, e.g. ``route add 1.2.3.4 127.1 255.255.255.255''.
2001-07-11 16:11:15 +00:00
Ruslan Ermilov
1c59bf7de3 Allow route(8) to create "proxy only" published ARP entries.
PR:		bin/12357
Submitted by:	Craig Leres <leres@ee.lbl.gov>
2001-06-12 13:31:53 +00:00
Ruslan Ermilov
86cd74127c Fixed the -iface breakage introduced with the latest KAME merge
in revision 1.48.  It is pretty valid and often feasible to use
a non-point-to-point interface as the gateway.  One might, for
example, use this to route some hosts through an ARP on a local
interface, without having to assign an additional IP address:

Script started on Tue Jun 12 16:16:09 2001
# ifconfig rl0 inet
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	inet 192.168.4.115 netmask 0xffffff00 broadcast 192.168.4.255
# netstat -arn -finet | grep -w rl0
192.168.4          link#1             UC          3        0     rl0 =>
192.168.4.65       0:d0:b7:16:9c:c6   UHLW        1        0     rl0   1197
# route add -net 192.168.100 -iface rl0
add net 192.168.100: gateway rl0
# ping 192.168.100.1
PING 192.168.100.1 (192.168.100.1): 56 data bytes
64 bytes from 192.168.100.1: icmp_seq=0 ttl=255 time=0.551 ms
64 bytes from 192.168.100.1: icmp_seq=1 ttl=255 time=0.268 ms
^C
--- 192.168.100.1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.268/0.410/0.551/0.142 ms
# netstat -arn -finet | grep -w rl0
192.168.4          link#1             UC          3        0     rl0 =>
192.168.4.65       0:d0:b7:16:9c:c6   UHLW        1        0     rl0   1165
192.168.100        link#1             UCSc        1        0     rl0 =>
192.168.100.1      0:d0:b7:16:9c:c6   UHLW        1        4     rl0   1192

Script done on Tue Jun 12 16:17:12 2001
2001-06-12 13:23:43 +00:00
Hajimu UMEMOTO
3384154590 Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.

TODO:
  - The definitions of SADB_* in sys/net/pfkeyv2.h are still different
    from RFC2407/IANA assignment because of binary compatibility
    issue.  It should be fixed under 5-CURRENT.
  - ip6po_m member of struct ip6_pktopts is no longer used.  But, it
    is still there because of binary compatibility issue.  It should
    be removed under 5-CURRENT.

Reviewed by:	itojun
Obtained from:	KAME
MFC after:	3 weeks
2001-06-11 12:39:29 +00:00
Ruslan Ermilov
1d36c8992d When changing an indirect route, kernel routing code allocates
a route to the gateway and caches it in the route structure.
It may happen (if the routing table is screwed) that the gateway
route is the same route as the one being modified, in which case
a kernel reports EDQUOT.  Be more verbose about this:

# route add -net 10 192.168.4.65
add net 10: gateway 192.168.4.65
# netstat -rn -finet
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use     Netif Expire
default            192.168.4.65       UGSc        1        7      rl0
10                 192.168.4.65       UGSc        0        0      rl0
127.0.0.1          127.0.0.1          UH          0      178      lo0
192.168.4          link#1             UC          2        0      rl0 =>
192.168.4.65       0:d0:b7:16:9c:c6   UHLW        2        0      rl0   1123

Before:

# route change -net 10 10.0.0.1
route: writing to routing socket: Disc quota exceeded
change net 10: gateway 10.0.0.1: Disc quota exceeded

After:

# ./route change -net 10 10.0.0.1
route: writing to routing socket: Disc quota exceeded
change net 10: gateway 10.0.0.1: gateway uses the same route

PR:		bin/1093, misc/26833
2001-06-08 12:44:25 +00:00
Ruslan Ermilov
1b33d61d20 Change the host/bits syntax introduced in route.c,v 1.24 to the
net/bits syntax, for consistency with netstat(1) in particular.

OK'ed by:	phk
MFC after:	1 week
2001-06-08 09:07:34 +00:00
Ruslan Ermilov
334b4431fa - Exit 1 if "add", "change", or "delete" operation fails.
PR:		bin/12489

- Use inet_ntoa(3) where it should have been used.  This
  part of code simply wasn't converted to the "new" style
  after the routename() function was converted from the
  protocol-generic version to protocol-specific version
  in CSRG revision 5.6.

MFC after:	1 week
2001-06-07 13:50:24 +00:00
Poul-Henning Kamp
3a36e32d8c Add a couple of newlines in the output from route monitor 2001-01-15 12:28:48 +00:00
David E. O'Brien
1a37aa566b Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00
Ruslan Ermilov
4eed20b85f Interpret the address argument as network-type address for `destination'
argument only.  Before that, the `route add default gateway' first tried
the `gateway' as network address and passed its name to getnetbyname(3),
which in the BIND resolution case does the T_PTR lookup on that name.
2000-09-29 10:50:11 +00:00
Ruslan Ermilov
ecfe112d3e Fixed the case where argument of 0.0.0.0/8 would match the default route. 2000-09-29 10:37:16 +00:00
Yoshinobu Inoue
b2fa7d408d Clear sin6_scope_id before passing routes into kernel, becaues kernel
don't support routes with sin6_scope_id set.
Without this fix, routes with IPv6 scoped addr won't work when it is
assigned by "route" command.

Approved by: jkh

Reviewed by: ume
2000-03-11 20:52:01 +00:00
Yoshinobu Inoue
5dc2a47de7 Add an scope index embedded IPv6 link local addr creation support, by route
command.
This is a workaround for some kernel interface which can't treat sin6_scope_id,
yet.
2000-02-23 18:00:33 +00:00
Yoshinobu Inoue
94fafad064 Support IPv6 scoped addr in ifconfig and route
IPv6 scoped addr display is not yet supported by ifconfig
   and route. Now almost of IPv6 apps support it, so its support
   in ifconfig and route is important to keep consisetncy, and
   to avoid user confusion.

Approved by: jkh
2000-02-10 03:03:09 +00:00
Munechika SUMIKAWA
d59590d848 Fix return value check for inet_pton().
Obtained from:	KAME Project
2000-01-25 13:54:47 +00:00
Yoshinobu Inoue
1e6f93d8f5 Merge bug fix from KAME repository.
This fix enables inet6 default route addition.

Suggested by: itojun
2000-01-08 14:28:46 +00:00
Yoshinobu Inoue
cfa1ca9dfa udp IPv6 support, IPv6/IPv4 tunneling support in kernel,
packet divert at kernel for IPv6/IPv4 translater daemon

This includes queue related patch submitted by jburkhol@home.com.

Submitted by: queue related patch from jburkhol@home.com
Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
1999-12-07 17:39:16 +00:00
Bill Fumerola
b41d4634e2 Remove two more unnecessary function declarations/prototypes. 1999-09-25 03:22:52 +00:00
Bill Fumerola
c3922760ba Include the proper headers, remove the unnecessary function declarations. 1999-09-25 03:20:29 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Archie Cobbs
eed2b804bf When incrementing through a SIOCGIFCONF list, enforce a lower limit of
sizeof(ifr->ifr_addr) for the variable length field ifr->ifr_addr.sa_len.
Otherwise the increment will be wrong in certain cases.

Obtained from:  Whistle source tree
For the record: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> suggests
                SIOCGIFCONF should be dropped in favor of a sysctl mechanism.
1999-06-05 05:55:07 +00:00
Ruslan Ermilov
1e3b39d361 Get rid of segfaults in a set-uid program.
PR:		11823
Reviewed by:	des
1999-06-01 13:14:07 +00:00
Philippe Charnier
1cc580ef41 Comment is .\" not .|'. Add -d and -t flags to SYNOPSIS and usage(). Getopt
returns -1. Correct use of .Nm. Spelling. Add rcsid and remove unused
#include.
1998-07-28 06:25:35 +00:00
Warner Losh
b1a3bc5ea0 style(9) corrections
Submitted by:	bde
1997-12-26 23:28:17 +00:00
Warner Losh
006b3faebb Two fixes:
1) Correct strncpy usage
	2) gethostbyaddr paranoia from Julian Assange
1997-12-24 00:59:49 +00:00
Julian Elischer
ba68720f4f fix what appears to me to be absolutle bogus code
to do with netmasks.. we fed totally bogus data into the kernel
to do with default routes and it just believed us. this led to:
1/ kernel panics
2/ the default route refusing to be deleted or added
(depending on a number of factors, usually it worked ok.)
1997-07-18 09:05:12 +00:00
Philippe Charnier
eee9b17e46 Sync beetween man page and usage string. 1997-06-18 06:30:34 +00:00
Poul-Henning Kamp
71044fa7ab Allow "modern" syntax:
route add -net 192.168.64.0/20 bla bla bla
1997-04-02 17:05:30 +00:00
Poul-Henning Kamp
8fd0ef3952 unifdef CCITT, ISO & CRUFT. 1997-04-02 16:52:45 +00:00
Peter Wemm
c0ec1f37ef Revert $FreeBSD$ to $Id$ 1997-02-22 14:40:44 +00:00
Ollivier Robert
a14390ccec Security patch from OpenBSD: fixes potential buffer overflow in a static
buffer (so more difficult to exploit but better safe than sorry). Found
by comparing FreeBSD & OpenBSD sources/logs for the auditing process.

Reviewed by:	Warner Losh
Obtained from:	OpenBSD
1997-02-20 22:16:39 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Garrett Wollman
97d1e20ef9 If the RTM_NEWMADDR and RTM_DELMADDR messages are defined
(in <net/route.h>), then interpret them appropriately.  This has
no effect until I commit the changes to multicast group
management (awaiting review).
1997-01-09 21:34:03 +00:00
Garrett Wollman
628d2ac1b0 Fix up programs which expect <net/if.h> to include <sys/time.h> to instead
do it themselves.  (Some of these programs actually depended on this
beyond compiling the definition of struct ifinfo!)  Also fix up some
other #include messes while we're at it.
1996-12-10 17:11:53 +00:00
Garrett Wollman
7948f68b85 Delete another unnecessary #include <sys/mbuf.h>. 1996-11-01 20:30:37 +00:00
Bill Fenner
4ba05f60ea setuid back to the original caller immediately after opening the route socket.
Opening the socket is the only privileged operation route requires.

Make a couple of static buffers bigger, and use strncpy() and snprintf() where
there's a chance of overflow.

Fixes PR bin/1903

Partially Submitted by: Ollivier Robert <roberto@keltia.freenix.fr>

Don't look up the network number if we're being asked to add a host route.

Fixes PR bin/1900

Submitted by:	Bruce A. Mah <bmah@cs.berkeley.edu> (pr bin/1900)
1996-10-27 17:42:14 +00:00
Bruce Evans
eaa86f9d7f Don't use __dead or __pure in user code. They were obfuscations
for gcc >= 2.5 and no-ops for gcc >= 2.6.  Converted to use __dead2
or __pure2 where it wasn't already done, except in math.h where use
of __pure was mostly wrong.
1996-09-14 03:00:32 +00:00
Julian Elischer
072a289aa4 back out a part of the previous patch that garrett objected to.. 1996-08-19 18:52:49 +00:00
Julian Elischer
aa648cf84b Submitted by: Archie@whistle.com
if making a interface route, and it's a P2P link,
then also automatically lable it as an llinfo entry so that
gated and friends don't clobber it..
1996-08-13 22:20:20 +00:00
Julian Elischer
914b41c2dc Reviewed by: julian
Submitted by:	archie@whistle.com

This patch allows true interface routing to be controlled
from the command line..
you can now do:
route add default -interface ppp0
even if you have no clue what the address at the other end is..

this is part of a set of changes that allow true "unnumbered links"
such as netcom run between their sites..
In practice you should assign the address from one of your ethernet
interfaces to the local side of the P2P link so that IP doesn't
say that the packet comes from 255.255.255.255, but
there is no need whatsoever to assign an address of any kind
to the remote end of the link.. useful for frame relay links etc also.
1996-08-09 22:52:02 +00:00
Julian Elischer
e56dd1bb4f Submitted by: archie@whistle.com
slight cleanups on yesterday's patches
1996-07-23 22:00:14 +00:00
Julian Elischer
3a67d2bc37 Submitted by: archie@whistle.com
appletalk cleanups
1996-07-23 01:18:47 +00:00
Julian Elischer
144b35344c changes to allow route to manipulate appletalk routes. 1996-07-09 19:02:28 +00:00
Garrett Wollman
00bbf73734 Update route(8) to print out current meanings of rt_flags RTF_* bits. 1996-05-08 20:48:59 +00:00
Mike Pritchard
2e32d69db1 Fix route to check if inet_addr and inet_network return INADDR_NONE,
instead of -1 which is never returned by those routines.
1996-02-17 21:13:32 +00:00
Garrett Wollman
cbc17e711e XNS sort-of-support is no more. 1996-02-13 17:30:37 +00:00
Garrett Wollman
0761cb293e Remove support for OSI networking in user-land (#ifdef OSI aor CCITT)
in preparation for its removal from the kernel source tree.  NB: because
a function was deleted, libc is now at version 3.0 (was 2.2 previously).
1996-02-06 20:36:15 +00:00
Mike Pritchard
49f523939f Route calls the errx routine with the wrong number of arguments
when printing "route: bad address: ...".
1996-01-20 12:56:57 +00:00
Garrett Wollman
ac9ce50507 Clean up GCC warnings, condition out some compatibility cruft, add $Id$.
Pointed-out-by: jmb
1996-01-02 20:09:22 +00:00
Paul Traina
57f30b48dc Missing 'break' after setting interface route flag was causing interface
routes to not be properly marked as static.
1994-09-15 08:35:37 +00:00
Rodney W. Grimes
8fae3551ec BSD 4.4 Lite sbin Sources
Note:  XNSrouted and routed NOT imported here, they shall be imported with
usr.sbin.
1994-05-26 06:35:07 +00:00