Commit Graph

99 Commits

Author SHA1 Message Date
David Greenman b2af64fd03 Added a fix for a bug which caused the wrong interface to be selected
for broadcasts if point-to-point links shared the same IP address as
the ethernet. The fix must be enabled with P2P_LOCALADDR_SHARE option
in the kernel config file. This will someday likely be standard, but
there isn't sufficient time before release to determine if there are
any interoperability problems with routed and/or gated.

Reviewed by:	Garrett Wollman, and me
Submitted by:	Peter Wemm
1995-05-27 04:37:24 +00:00
David Greenman c9a8415607 Fixed route reference count bug that squirmed in during the the
routing-socket code upgrade from Berkeley..

Submitted by:	Garrett Wollman via Peter Wemm via Cornell
1995-05-15 22:57:53 +00:00
Rodney W. Grimes b2b795f07c Fix -Wformat warnings from LINT kernel. 1995-05-11 19:26:53 +00:00
Garrett Wollman 748e0b0acc Make networking domains drop-ins, through the magic of GNU ld. (Some day,
there may even be LKMs.)  Also, change the internal name of `unixdomain'
to `localdomain' since AF_LOCAL is now the preferred name of this family.
Declare netisr correctly and in the right place.
1995-05-11 00:13:26 +00:00
Garrett Wollman 78a8281095 Updated routing-socket code from Berkeley
Obtained from: Keith Bostic by way of Paul Traina
1995-05-10 16:48:52 +00:00
David Greenman 94a5d9b6a1 Replaced some bcopy()'s with memcpy()'s so that gcc while inline/optimize. 1995-05-09 13:35:48 +00:00
Bruce Evans 402c1682aa Fix misplaced idempotency #endif.
Fix tabs and spaces in the wrong places.
1995-04-29 15:24:00 +00:00
Paul Traina 2f688f82da Incorporate new radix code from UCB. This fixes the orphaned mask bugs.
This submission was done by hand-applying FreeBSD local modifications on
top of the UCB code, rather than trying to patch the UCB code in on top
of the FreeBSD code due to the extensive changes.

Reviewed by:	pst	(been handling 30k routes for 4+ months)
Obtained from:	Sklower/Woody/Honing/Traina (8.4 UCB release)
1995-04-28 23:01:37 +00:00
Andrey A. Chernov d86851edf5 Implement SLIOCSUNIT (set slip unit number) 1995-04-28 18:47:29 +00:00
Paul Traina f5fea3ddc9 Cleanup loopback interface support.
Reviewed by:	wollman
1995-04-26 18:10:58 +00:00
Garrett Wollman cd02a0b741 Finally finish the cloning cleanup work by making sure that clones
go away whenever a clone's parent is changed, or a route is added in a
certain set of circumstances.

This also includes code to forbid setting a route's gateway to an
address which can only be reached through that route, thus (hopefully)
eliminating one class of cloning bottomless-recursion bugs.
1995-04-25 19:12:07 +00:00
Garrett Wollman 1f3d84e82a Tunnel driver is nmow capable of installing its own cdevsw[] entry,
with a little help from conf.c.  While e're at it, actually declare the
tunnel entry points to have the correct types.  This fixes PR #306.
1995-04-10 20:35:45 +00:00
Bruce Evans 5f679211e3 Fix slioctl(). It has to return -1 for ioctls that it doesn't know about
so that these ioctls can be handled by the calling layer(s).

Clean up the recently added code:
- include the appropriate header to declare an implicitly declared function.
- declare timeout functions correctly and remove numerous bogus casts that
  hid (but didn't fix) their incorrectness.
1995-04-02 00:11:48 +00:00
Andrey A. Chernov 8a9f513775 slopen() never sets t_line to SLIPDISC, but uses slip-specific queue allocation 1995-04-01 22:11:10 +00:00
David Greenman b4fff2ae1a Patch from Greg Ansley:
In rare cases, when the filter specified accesses an multi-byte value that
is split across mbuf's, the value loaded is incorrect.  And if you are very
unlucky (like me) it will index off the end of the mbuf and into an
unallocated page and panic the system.

If you look at the code you will discover the the index *k* is added to
the pointer *cp* and the used AGAIN as a subscript.
1995-04-01 01:46:27 +00:00
Andrey A. Chernov dfd88e5a00 Fix typing error sneaked somehow in prev. commit 1995-03-31 11:01:29 +00:00
Andrey A. Chernov ca9301398c This sl enhancement helps to keep serial line (modem) connection alive.
It is common case when modem hangs with carier on but don't
receive anything from another side.
This thing commonly healed with hangup and redialing.
Enhancements below allows to determine when such action
is needed and inform attach program with SIGURG signal.
There two ioctls set: outfill and keepalive, used from both
sides of connection. Outfill repeatedly sends FRAME_END with
specified timeout (i.e. 40 seconds). It is needed to get input on
other side even if no user activity on slip line currently.
Keepalive checks FRAME_ENDs from other side, and if no one
got in specified timeout (i.e. 60 seconds, max modem retrain time),
send SIGURG to attach program.
I plan to add code to slattach to handle this thing too.

Reviewed by: wollman
1995-03-30 20:43:32 +00:00
Andrey A. Chernov 3de5725908 pppinput:
Fix serial errors handling
Add no carrier check
1995-03-29 20:34:17 +00:00
Garrett Wollman a29ae2a103 Don't delete clones if they are PINNED. 1995-03-24 20:05:28 +00:00
Garrett Wollman 3545b0484c radix.c: correct exit condition in rn_walktree_from()
route.c: be a little more careful when running deleting children of dying
.        routes
1995-03-23 18:07:29 +00:00
Garrett Wollman 771edb14e9 Protocol-cloned routes should gain a reference to their parents to make
sure that rt->rt_parent values can never be re-used harmfully.
1995-03-21 19:50:34 +00:00
David Greenman 3682d2baf0 Made minor readability tweak. 1995-03-20 23:00:57 +00:00
Garrett Wollman c2bed6a371 Better fix for the deletion of parents of cloned routes problem,
superseding the `nextchild' hack.  This also provides a way
forward to fix RTM_CHANGE and RTM_ADD as well.
1995-03-20 21:30:21 +00:00
Garrett Wollman 69244b69db Support for pseudo-device LKMs. Note that this is restricted to only
one pseudo per module (a restriction which will eventually be lifted) and
isthus not in its final form.
1995-03-20 19:20:44 +00:00
Garrett Wollman e1838a91c1 Beginnings of support for loadable pseudo-devices. bsd.kmod.mk support
and Makefiles for the more interesting ones to come on Monday.
1995-03-17 22:02:18 +00:00
Bruce Evans b5e8ce9f12 Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) and most of the warnings from
`gcc -Wnested-externs'.  Fix all the bugs found.  There were no serious
ones.
1995-03-16 18:17:34 +00:00
David Greenman e8f1ce6f5a Added $Id$ 1995-03-14 22:15:36 +00:00
David Greenman d41f24e742 Added support for generic FDDI and the DEC DEFEA and DEFPA FDDI adapters.
Submitted by:	Matt Thomas
1995-03-14 09:16:07 +00:00
David Greenman af78195e00 Reduced loopback MTU to 16k to work around a miriad of problems with it
set near or above 32k (likely caused by 16bit signed word overflow). 16k
actually (surprizingly) has higher performance than other values I tested.
1995-03-04 04:28:50 +00:00
Atsushi Murai 53c9f6c0c4 New user Process PPP based on iij-ppp0.94beta2.
o Supporting SYNC SIO device (But need a device driver)
     - add "set speed sync"
   o Fixing bug for Predictor-1 function.
   o Add new parameter that re-sent interval for set timeout commands.
   o Improving RTT (Round Trip Time) and reducing processor time.
     - Previous Timer service was using polling, and now using
       SIGALRM ;-)
     - A 0.94beta2 will not work correctly....

   -- Follows are additinal feature not including 0.94beta2
   o Support Proxy ARP
     - add "enable/disable proxy" commands
   o Marging common routine in CHAP/PAP.
   o Enhancing LCP/IPCP log information.
   o Support local Authfication connection on port 300x and tty.
     - You can set up pair of your "hostname -s" and
       password in ppp.secret. if either ppp.secret file nor
       your hostname line don't exist, It will notify a message
       and working as same as previous version.(Backword compatibility)
     - If you did set up them, It's allow connection but nothing to do
       except help and passwd command.
     - add "passwd yourpasswd" commands
   o Support afilter - keep Alive filter that a packet can send/receiving
     according to ifilter/ofilter but doesn't count it as preventing idle
     timer expires.
     - Same syntax of other filters.
   o Fixing bugs reported by current user for previous one. Thanks !!

Reviewed by: Atsushi Murai (amurai@spec.co.jp)
1995-02-26 12:18:08 +00:00
David Greenman 386094e305 Fixed comment - IFT_P80 is 80mbit.
Submitted by:	frank@fwi.uva.nl (Frank van der Linden)
1995-02-25 15:57:55 +00:00
David Greenman 55088a1c1e In ifa_ifwithdstaddr() when walking through ifa structs associated with
a point-to-point link, don't attempt a comparison if the pointer to the
destination sockaddr is NULL (i.e. it has not been set/initialized).
1995-02-24 11:47:31 +00:00
Garrett Wollman 39052a0eeb Attempting to bind() or connect() a routing socket, while meaningless,
shouldn't cause a panic.

Obtained from: Stevens, vol. 2, p. 667
1995-02-16 01:11:38 +00:00
Jordan K. Hubbard e53e112497 Nuke some more compiler warnings, while I'm at it.. 1995-02-15 06:28:48 +00:00
Andrey A. Chernov a3f80a9b22 *close: just purge tty queues if we can't drain them 1995-02-13 02:09:14 +00:00
Garrett Wollman 81e3e0570d Define RTF_PINNED for future use. 1995-02-08 20:01:13 +00:00
Garrett Wollman 5404440735 Correct fix for merge conflicts: RTM_VERSION is always 5. Header files
included by user code must never depend on kernel compile options.
1995-02-07 19:05:12 +00:00
David Greenman e128aa716c Fixed unresolved CVS conflict on RTM_VERSION. 1995-02-07 06:19:56 +00:00
Garrett Wollman 24e16f2e1c Merge in the socket-level support for Transaction TCP from the OLAH_TTCP
branch.

Submitted by: Andras Olah <olah@cs.utwente.nl>
1995-02-07 02:01:57 +00:00
Atsushi Murai b74038e18b 1995-01-31 06:15:49 +00:00
Bruce Evans 6670942f71 Declare `struct mbuf' with the correct scope to avoid lots of warnings
for compiling routed...  Previously a kernel function pointer that is
bogusly visible to applications was incompletely declared to hide the
problem.
1995-01-24 04:47:33 +00:00
David Greenman 3ec66d6c39 Added back the missing last few bytes of the file. 1995-01-23 17:53:21 +00:00
Garrett Wollman 18e1f1f110 route.c: keep track of where cloned routes come from, and make sure to
delete them when the ``parent'' goes away

route.h: add glue to track this to rtentry structure.  WARNING WILL ROBINSON!
This will be yet another incompatible change in your route-using binaries.
I apologize, but this was the only way to do it.  I took this opportunity
to increase the size of the metrics to what I believe will be the final
length for 2.1, so that when the T/TCP stuff is done, this won't happen
again.
1995-01-23 02:00:35 +00:00
Stefan Eßer 623976474c Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de>
Reviewed by: <wollman>
First hooks and defines for the ISDN driver,
that soon will see the light ...
1995-01-05 19:51:51 +00:00
David Greenman 73c2ab4621 Moved declaration of ifnet pointer out of the header file and into the
.c file where it belongs. Bezeroed some uninitialized malloc data.
1994-12-30 06:46:21 +00:00
Garrett Wollman 59d8d13f60 Added `ds', a black-hole network interface. 1994-12-22 21:00:05 +00:00
David Greenman 511cdd1649 Removed bogus semicolon at end of a #define line. 1994-12-22 07:20:03 +00:00
Garrett Wollman 074c4a4e2e Add generic part of generic multiple-physical-interface support (the
successor of IFF_ALTPHYS).
1994-12-21 22:57:05 +00:00
Garrett Wollman b30cbe4a6b Add a #define for if_rawoutput(), which isn't used now, but eventually will
be.
1994-12-21 18:03:41 +00:00
Garrett Wollman 652082e6ac Implemented rtalloc_ign(). 1994-12-13 23:07:03 +00:00