Commit graph

174 commits

Author SHA1 Message Date
Ulrich Spörlein 4b85a12f71 Spelling fixes for sbin/ 2012-01-07 16:09:33 +00:00
Dimitry Andric 1ff68ea3a0 Use NO_WARRAY_BOUNDS for sbin/routed/rtquery.
MFC after:	1 week
2011-12-16 23:43:58 +00:00
Rebecca Cran 59b956cba0 Fix use of AND operator: should be bitwise instead of logical. 2010-11-22 19:40:27 +00:00
Ulrich Spörlein 7cc1fde083 mdoc: drop even more redundant .Pp calls
No change in rendered output, less mandoc lint warnings.

Tool provided by:	Nobuyuki Koganemaru n-kogane at syd.odn.ne.jp
2010-10-19 12:35:40 +00:00
Ulrich Spörlein b108792d90 routed(8)/rtquery(8) bump/demote to WARNS=3 for all archs
- The MACHINE_ARCH check is not exhaustive (missing at least powerpc),
  and generally not worth maintaining.
- While here, fix whitespace and ordering of the Makefile

PR:		bin/140081
Approved by:	ed (co-mentor)
2010-02-27 10:17:27 +00:00
Antoine Brodin 13e403fdea (S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument.
Fix some wrong usages.
Note: this does not affect generated binaries as this argument is not used.

PR:		137213
Submitted by:	Eygene Ryabinkin (initial version)
MFC after:	1 month
2009-12-28 22:56:30 +00:00
Ruslan Ermilov 106d839190 Switch the default WARNS level for sbin/ to 6.
Submitted by:	Ulrich Spörlein
2009-10-19 16:00:24 +00:00
Poul-Henning Kamp 47e493d28c Only raise WARNS to 6 on i386 and amd64, strict alignment platforms still
barf at some of the gratuitous pointer gymnastics, and I do not see a
simple solution.
2009-04-06 07:13:26 +00:00
Poul-Henning Kamp 5ac0b00fd3 Silence a printf warning 2009-04-05 18:28:42 +00:00
Poul-Henning Kamp a3e04ddcaf Add some consts, remove some unused stuff and other attempts to calm
FlexeLint down.
2009-04-05 17:33:07 +00:00
Poul-Henning Kamp 960b861b57 Fix casts which are not by definition safe, but which malloc(3)
makes safe for us.
2009-04-05 17:12:13 +00:00
Poul-Henning Kamp 49694c6d53 Some constifications 2009-04-05 16:01:56 +00:00
Poul-Henning Kamp f2ca6d8a90 Modernize prototypes (ie: no extern)
Make lots of stuff static.
2009-04-05 15:55:09 +00:00
Poul-Henning Kamp 6b6b828054 Convert list of remote interfaces to LIST_* macros 2009-04-05 15:06:02 +00:00
Poul-Henning Kamp 9940236ef3 Kick WARNS level up to 6 by fixing various trivial warnings. 2009-04-05 14:15:05 +00:00
Poul-Henning Kamp 38ae65235e Use <sys/queue.h> to manage the interface list. 2009-04-05 14:01:39 +00:00
Poul-Henning Kamp 3b3e61faa1 Remove newlines from string argument of __COPYRIGHT(), it results in
assembler warning messages.
2009-04-05 13:48:06 +00:00
Poul-Henning Kamp c2aabe6855 Send multicast on p2p interfaces if they can and are not prohibited
from doing so with no_rip_mcast in /etc/gateways.

This allows routed(8) to work with the way ports/security/openvpn
employs the tun(4) interface.
2009-04-05 12:41:59 +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
Poul-Henning Kamp 68b22388a0 Update routed to use the RFC 3678 protocol-independent multicast API. Use
IP_MULTICAST_IF with struct ip_mreqn (obtained from Linux) to tell the
stack which interface index to use for sending IPv4 datagrams.

Submitted by:	bms
Tested by:	phk
2008-07-30 11:56:15 +00:00
Poul-Henning Kamp 2a6d272c10 Clarify which route property routed(8) looks at. 2008-07-29 23:22:06 +00:00
Tom Rhodes a4fff644c3 Sync up with rhyolite routed 2.31 which fixes the handling of varargs.
Remove -p from usage, it's gone completely now.

PR:		83387
Submited by:	arved
2006-11-05 14:49:47 +00:00
Maxim Konovalov 52146665a5 o Remove rev. 1.14 debug printf(3) leftovers.
PR:		bin/90389
Submitted by:	Gavin Atkinson
OK'ed by:	phk
2005-12-20 18:18:37 +00:00
Stefan Farfeleder a3ae5e4ede Use socklen_t where appropriate. 2005-08-05 09:58:49 +00:00
Stefan Farfeleder 92e7a424c5 Remove #ident directives, they don't exist on the vendor branch anymore. 2005-05-31 20:28:49 +00:00
Ruslan Ermilov 6087df9e8b Sort sections. 2005-01-18 10:09:38 +00:00
Poul-Henning Kamp e53915c97f Don't declare everything we find on a loopback interface for passive:
Only the actual loopback address should be declared passive, other
addresses are very likely to be desirable to announce.

Check for IFF_LOOPBACK instead of IFF_PASSIVE to determine if we have
an unknown interface type.
2004-08-14 08:36:35 +00:00
Ruslan Ermilov a55042cb4e Removed commented out bitrot. 2004-08-13 14:18:24 +00:00
Ruslan Ermilov 9806e23132 Mechanically kill hard sentence breaks. 2004-07-02 21:45:06 +00:00
Bruce M Simpson c90cea0093 Turn on RFC 1724 compliant behaviour with regards to IP_ADD_MEMBERSHIP;
routed should be able to specify multicast memberships to be added by
interface index. This should fix the unnumbered / point-to-point case
for RIPv2.

PR:		bin/51927
Requested by:	Eugene Grosbein
2004-06-16 05:08:57 +00:00
Bruce M Simpson 0529700abc Ignore kernel routes with the RTF_WASCLONED flag set. This is a slight
modification of a patch which was already applied for BSD/OS in the
Rhyolite.com sources; this file is already off the vendor branch.

PR:		bin/57484
Submitted by:	Richard Perini
2004-06-15 00:23:26 +00:00
Ruslan Ermilov d04b5dfe6c Assorted markup, grammar, and spelling fixes. 2004-05-17 08:35:43 +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
Bruce M Simpson c39ebb1dbb Sync HEAD sources to vendor branch import of routed v2.27 from rhyolite.com.
Update <protocols/routed.h> for the MD5 changes requested in bin/35843.
Preserve local changes.

Education by:	obrien, markm, pointy-stick
PR:		bin/35843 (and doubtless others)
2004-02-25 23:45:57 +00:00
Bruce M Simpson caa79e368e Virgin import of rhyolite.com routed v2.27 2004-02-25 23:20:22 +00:00
Johan Karlsson 604d24db95 style.Makefile(5):
Use WARNS?= instead of WARNS=.
2004-02-23 20:25:27 +00:00
Ruslan Ermilov 47d7e8a96f Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
Ruslan Ermilov 4c57a8cabe Removed duplicate $FreeBSD$ tag. 2004-01-29 14:36:16 +00:00
Warner Losh 534734ed17 Prefer PATH_MAX to MAXPATHLEN. Both contain the trailing NUL, so
remove the unneeded +1.
2003-08-07 05:38:56 +00:00
Philippe Charnier 510dd42e55 The .Xr utility 2003-06-08 12:55:55 +00:00
Ruslan Ermilov 69ae49609a mdoc(7) fixes: Mark "gated" with the .Nm macro.
Approved by:	re (blanket)
2003-05-19 19:54:00 +00:00
Murray Stokely 6f34d4fe78 Note that gated is a commercial routing product now, and remove
references to it's man page, which is almost never installed on a
FreeBSD system.  The information about using this command with gated
has been retained.  I have just made it clear that gated is not a part
of FreeBSD.

PR:		docs/51407
2003-05-04 06:13:25 +00:00
Andrey A. Chernov ae4ce2c16e Use srandomdev() for FreeBSD 2003-02-11 02:31:53 +00:00
Jens Schweikhardt 9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Philippe Charnier 7fed38d0a0 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:10:45 +00:00
Tom Rhodes ce66ddb763 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
Philippe Charnier 629e80effb The .Nm utility. 2002-07-06 19:35:14 +00:00
Jeroen Ruigrok van der Werven 59501efcbd Add the possibility to use a no_rip_out configuration option in order
to stop routed from sending out RIP updates.

PR:		29090
Submitted by:	Matthew Braithwaite <mab@red-bean.com>
2002-04-07 17:01:20 +00:00
Warner Losh d476a036e2 o remove __P
o remove main prototype
2002-03-21 13:20:49 +00:00
Ruslan Ermilov e629e744a2 mdoc(7) police: GC duplicate VCS ID. 2002-03-15 15:02:13 +00:00
Mike Barcroft fd8e4ebc8c o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
  source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
  Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
  POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
  and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
  complexities associated with having MD (asm and inline) versions, and
  having to prevent exposure of these functions in other headers that
  happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
  third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on:	alpha, i386
Reviewed by:	bde, jake, tmm
2002-02-18 20:35:27 +00:00
Jens Schweikhardt ac512bd99a Insert a missing paragraph break (.Pp).
MFC after:	3 weeks
2002-01-24 17:49:09 +00:00
Jens Schweikhardt 22539cefa1 Fix typo by s/advertise/advertises/
MFC after:	4 weeks
2002-01-16 19:19:09 +00:00
David E. O'Brien 2d68bf45bf Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
2001-12-04 02:19:58 +00:00
Ruslan Ermilov bd1a63798a The directory of the makefile that's including the file is tried first.
See section 3.2 of "PMake - A Tutorial" in /usr/share/doc/psd/12.make.
2001-10-25 08:37:12 +00:00
Peter Wemm 98815cc740 ftrace is already initialized 2001-08-13 21:56:09 +00:00
Ruslan Ermilov c75526d5a0 mdoc(7) police: fixed the "new sentence" bogons. 2001-08-10 15:03:10 +00:00
Ruslan Ermilov 9fe48c6e8d mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 11:04:34 +00:00
Dima Dorfman 70d51341bf mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
Ruslan Ermilov 5521ff5a4d mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2). 2001-07-06 16:46:48 +00:00
Poul-Henning Kamp 3ce965f82e Fix a byteorder problem in a diagnostic message.
PR:		16625
Submitted by:	Peter Jeremy <peter.jeremy@ALCATEL.COM.AU>
2001-06-06 20:52:30 +00:00
Ruslan Ermilov 0a5779d45b - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
Ruslan Ermilov fe655281c5 Set the default manual section for sbin/ to 8. 2001-03-20 18:13:31 +00:00
Ruslan Ermilov 896eb7d10c Prepare for mdoc(7)NG. 2001-01-16 09:15:57 +00:00
Ruslan Ermilov 1252c1bb05 Prepare for mdoc(7)NG. 2000-12-18 15:16:24 +00:00
Ruslan Ermilov 7c7fb079b9 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 16:52:27 +00:00
Ruslan Ermilov 726b61ab5f Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
Sheldon Hearn c0e2b70a76 Add $FreeBSD$. 2000-08-11 08:23:26 +00:00
Sheldon Hearn 6017865885 Resolve conflicts. 2000-08-10 07:54:33 +00:00
Sheldon Hearn 8b336df137 Import routed-2.22. 2000-08-10 07:48:06 +00:00
Sheldon Hearn 064effd49b Resolve conflicts from vendor merge. 2000-08-02 11:38:20 +00:00
Sheldon Hearn f7434bbd42 Import routed-2.21. 2000-08-02 11:12:54 +00:00
Jonathan Lemon 48f0c5dc0c Fix memory leak when route addition fails.
Obtained from:  NetBSD
2000-06-02 21:19:43 +00:00
Yoshinobu Inoue d2a6238892 Add new rtmsg types which already defined in kernel. 2000-03-30 07:18:04 +00:00
Yoshinobu Inoue 230df2f637 Prevent buffer overflow.
PR: bin/17657
Submitted by: tanimura
2000-03-30 01:50:15 +00:00
Kris Kennaway a320d9a259 Remove dead xrefs to gated(8) and htable(8)
Obtained from:	OpenBSD
1999-11-15 02:53:31 +00:00
Peter Wemm 7a6c3acc83 $Revision$ -> $FreeBSD$ (more cleanup needed here) 1999-09-05 17:49:11 +00:00
Peter Wemm 7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Mike Pritchard aa7c9adaea Various man page cleanup:
- Sort xrefs
- FreeBSD.ORG -> FreeBSD.org
- Properly xref RFCs.
- Be consistent with section names as outlined in mdoc(7).
- Other misc mdoc cleanup.

PR:		doc/13144
Submitted by:	Alexey M. Zelkin <phantom@cris.net>
1999-08-15 08:06:12 +00:00
Mark Murray a657e5291f Incomplete. Back out until I can revisit. 1999-05-05 20:28:54 +00:00
Mark Murray 2ba7a95271 Restore perror --> err changes. 1999-05-05 06:15:30 +00:00
Mark Murray c90fe7dc24 Merge-o-matic and add a bunch of $Id's 1999-05-02 13:14:16 +00:00
Mark Murray 2c7a97817b Latest-and-greatest routed.
Includes RIPv2 and Router Discovery.

Submitted by:	Vernon Schryver <vjs@calcite.rhyolite.com>
1999-05-02 10:51:54 +00:00
Philippe Charnier 90100551e6 Spelling, add rcsid, remove unused #includes.
Convert 1000000 usec to 1 sec 0 usec.
Use provided safe malloc (rtmalloc()) instead of malloc(): exit on allocation
failure.
Correct use of .Nm
Add usage() and use errx().
1998-07-28 06:36:31 +00:00
Poul-Henning Kamp 6f48600e53 /usr/src/sbin/routed/parms.c and .../routed/rtquery/rtquery.c both
contain code that compare a char pointer with a char.  As this
doesn't make much sense, it looks very much as if a '*' has been
dropped by mistake.  I have made no analysis of the possible
consequences of the problem.

PR:		7319
Reviewed by:	phk
Submitted by:	Anders Thulin <Anders.X.Thulin@telia.se>
1998-07-22 05:49:36 +00:00
Joseph Koshy d00b8231bd Remove reference to non-existent htable(8).
PR: 6940
1998-06-17 13:13:41 +00:00
Poul-Henning Kamp 0a61a2c2ce Problem whith "subnet=" statement in /etc/gateways.
routed discards the first character of the network address.
Example: "subnet=10.0.0.0/24,1"
The network address is interpreted as 0.0.0.0/24,1.
PR:		4825
Reviewed by:	phk
Submitted by:	Mike E. Matsnev <mike@azog.cs.msu.su>
1998-04-19 17:53:16 +00:00
Philippe Charnier 69036300b2 Use err(3). Change exit(-1). Remove unused #include. 1998-01-14 07:17:12 +00:00
Daniel O'Callaghan 6f1edd29a4 Fix typo in comment. 1997-09-12 10:52:49 +00:00
Julian Elischer a455644f13 Check if routed had the same problems that route(1) had.
The answer is not really, but almost.
it sent data that was ok, though it was a hack,
but it was bug-compatible with the kernel on receiving them. This also
had been fixed with a hack.. I hacked it better I think.
1997-07-18 11:08:35 +00:00
Philippe Charnier 768b3fbd57 Sync man page and usage string. Remove unused -p option from getopt call. 1997-06-18 06:34:28 +00:00
Philippe Charnier 7766b145c4 Sync man page and usage string. 1997-06-18 06:33:11 +00:00
Masafumi Max NAKANE ac162c8fa6 Typo fix.
PR:		3854
Submitted by:	Takahiro Yugawa <yugawa@orleans.rim.or.jp>
1997-06-13 20:58:09 +00:00
Warner Losh 8d64695c7c compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 03:33:12 +00:00
Mike Pritchard 6bae29046e Some minor mdoc cleanup. Partially based on PR# 2959. 1997-03-12 13:22:17 +00:00
Peter Wemm c0ec1f37ef Revert $FreeBSD$ to $Id$ 1997-02-22 14:40:44 +00:00
Mike Pritchard 7610c94088 Some various mdoc cleanup.
Partially Obtained from: NetBSD-bugs mailing list
1997-01-28 05:55:22 +00:00
Mike Pritchard ca76031b72 Various minor cleanup.
Partially Obtained from: NetBSD-bugs
1997-01-19 17:57:15 +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