Commit Graph

923 Commits

Author SHA1 Message Date
thorpej c9dee7e411 Do not provide memcpy()/memset()/memcmp() macros as wrappers
around b*() functions (!!).
2001-12-23 22:36:16 +00:00
itojun 745e191850 move protosw fragment for gif/stf to their own source code.
reduce #ifdef in stf code.  sync with kame
2001-12-21 03:21:50 +00:00
itojun 14dad29d69 whitespace and comment. sync with kame 2001-12-21 02:50:02 +00:00
martin 61eb776b48 Remove yet another spurious (debug?) output. 2001-12-16 23:55:28 +00:00
martin b2bd90b630 Cleanup softc more completely on "ifconfig down", but only if we are
currently in a connection reestablishement state.

The previouse (incomplete/unconditional) cleanup confused the state machine.
2001-12-16 23:53:31 +00:00
martin 729b826ecd Fix packet accounting (now netstat -i and netstat -ib show reasonable
values).

Implement a secondary connection-reestablishement mode, which is only
entered after (1) we have successfully transfered payload data over this
connection and (2) if initial retries did not reestablish a session.
In this mode we retry (infrequently) forever, until adminstrator stops
us (by "ifconfig ppppoe0 down"). XXX - need to display this mode in
pppoectl.

It is now possible to pull the DSL modems plug for say 15 minutes, plug
it back in again and just wait. The connection will be reestablished within
three minutes.
2001-12-16 11:40:52 +00:00
martin c8006a73d3 Remove some spurious (debug?) output. 2001-12-16 00:55:40 +00:00
martin 7801c694b0 Enable additional error messages for the discovery phase, clarify some
others. Change one timeout slightly - we need to make all others user
settable.
2001-12-15 20:43:31 +00:00
martin f19c69323c Make reconnects after LCP keepalive detected an error actually work. 2001-12-15 20:40:37 +00:00
thorpej f77397d481 Use __sh__ instead of __sh3__. 2001-12-14 23:30:02 +00:00
martin 8b3d9b9497 Enable active LCP keepalive handling in the PPP layer, the PPPoE layer
itself has no means to detect broken connections.
2001-12-10 23:23:24 +00:00
martin 0099682916 Now that everything works without LINK1 set, do not set it by default.
While here, remove an unnecessary splnet()/splx() pair.
2001-12-10 00:24:12 +00:00
martin d585188042 We explicitly close LCP when going to state CLOSED, so we better open
it again when going from INITIAL to STARTING. This has been done for
passive or auto-conecting interfaces always, but not for permanent
ones.

This fixes session reestablishement for PPPoE interfaces without LINK1 set,
and probably also closes PR kern/11161.

Thanks to Jared D. McNeill and Ross Harvey for sugesting debug methology.
2001-12-10 00:22:21 +00:00
martin b1554100e7 Change the way IPCP negotiation is handled.
Collect both local and remote address and set them to the interface in
one step (the peer adress was not set at all before).

This causes the peer address now to show up on the interface and all
messages to the routing socket to be send with correct data. The latter
has been the last missing piece to complete PPPoE support.
2001-12-08 19:46:39 +00:00
ross cbaa950b62 code cleanup for portability 2001-12-04 21:32:15 +00:00
abs 42ceb2f007 Add an #if defined(INET) ... around if_detach_queues's declaration to match the
one around its definition.
2001-12-02 19:44:25 +00:00
martin 6e766675c6 Fail early when trying to identify a pppoe interface softc (from a
HOST UNIQUE token) and our list of interfaces is empty. Without this
test an unitinalized pointer may be dereferenced.
2001-12-01 18:25:23 +00:00
augustss 113024244c Make it compile in the absence of networks. Closes PR 14274 (mine). 2001-11-27 17:32:57 +00:00
martin 86c6c53869 Sanity check the tunnel route after computing it and don't mark the
interface up if there is no route or the route loops back to ourself.
This helps to avoid pilot errors which would result in kernel stack
overflows.
2001-11-24 15:46:08 +00:00
martin c21931cf1d Make this respect down interfaces. 2001-11-24 00:21:27 +00:00
lukem 2565646230 don't need <sys/types.h> when including <sys/param.h> 2001-11-15 09:47:59 +00:00
thorpej 1e6d430c86 Someone <sys/param.h> was deleted from the includes list. Add it
back so that this file compiles again.
2001-11-15 07:01:27 +00:00
lukem 64a432d965 remove unnecessary #if NFOO > 0 .... #endif wrappers 2001-11-13 00:49:35 +00:00
lukem 34d65a3414 add RCSIDs 2001-11-12 23:49:33 +00:00
bjh21 3048d543d3 Use the (not so-)newly-allocated IFT_ECONET rather than IFT_OTHER. This means
that programs start printing Econet link-layer addresses corrctly.
2001-11-12 20:19:04 +00:00
bjh21 54407dd7d8 Sync with IANA. This finally gets us IFT_ECONET. 2001-11-07 12:14:17 +00:00
itojun 087b694325 too many curly brace. 2001-11-06 08:14:27 +00:00
matt b26f63f404 Fix pr#14481 2001-11-06 06:26:34 +00:00
matt b5e785f38d Switch to using queue access macros instead of refering to the member
fields explicitly.
2001-11-05 18:02:15 +00:00
atatat 6e885d365a Turn the tun device/network interface into a cloning device. 2001-10-31 20:08:17 +00:00
martin 4e61daf35e In preparation for further changes: remove big parts of the ifdef mess
for OSes we no longer share this file with.
2001-10-29 19:15:48 +00:00
simonb 5f717f7c33 Don't need to include <uvm/uvm_extern.h> just to include <sys/sysctl.h>
anymore.
2001-10-29 07:02:30 +00:00
martin d1f0e4f6e4 Don't call if_alloc_sadl when creating the pppoe interface, it's called
from sppp_attach.
When destroying the interface, call sppp_detach for proper cleanup.
This avoids a crash from the slow timeout handler for no longer existing
interfaces (spotted by Rémi Zara).
2001-10-28 09:48:20 +00:00
matt 1ebf8505b2 Add ETHERTYPEs for MPLS (Unicast & Multicast). 2001-10-18 21:29:19 +00:00
itojun dfb1429789 unifdef OLDIP6OUTPUT 2001-10-17 08:23:05 +00:00
itojun 3594efccf6 on RTM_DELETE, reduce refcnt on rt->rt_parent, to avoid leaks.
from IIJ seil team
2001-10-16 02:42:36 +00:00
simonb 0fbef69268 Put the storage class first in an array declaration. 2001-10-14 00:39:09 +00:00
thorpej 5b01f60e5b The bridge driver does all forwarding at interrupt level, and
does not use software interrupts; remove these bridge netisr
hooks left over from a previous incarnation of the bridge code.

Noted by Andrew Brown <atatat@atatdot.net>.
2001-10-06 15:46:33 +00:00
bjh21 25d06cf184 Install net/ieee1394.h the same way we install all the other
link-layer-specific headers.
2001-10-05 12:37:39 +00:00
itojun 6374da40e1 don't softintr_disestablish twice.
previous code panic'ed with the following command sequence:
# ifconfig gif0 create tunnel A B
# ifconfig gif0 deletetunnel
# ifconfig gif0 destroy
2001-09-26 07:54:19 +00:00
onoe b7c46d6199 use ALIGNED_POINTER() instead of ALIGN().
The type of ALIGN() is vary on architecture and casting pointer to u_int
is incorrect for MI code.
Since the code is to make sure aligned access to IP header and requires
bcopy if the test fails.  So the performance implication is not necessary
and we can use ALIGNED_POINTER() here.
pointed out by nathanw.
2001-09-25 01:07:53 +00:00
reinoud 78b6ed208e Change the caddr_t to uintptr_t and remove the cast ... it gave problems
compiling on an LP64 ... discussed with Gimpy, atatat and bleeh
2001-09-24 21:47:57 +00:00
onoe b698d56d3c Move IBSS creation stuff from awi to ieee80211. 2001-09-20 13:54:43 +00:00
onoe aebd449baa Fix for FH infrastructure mode.
XXX: FH chanset should be calculated by FH hop pattern, but BayStack 650 AP
     always specify chanset to fixed value 1.  The previous code try to this
     hack into awi driver, but it is insufficient because the chanset value
     in awi driver may change while scan and it may be different from the
     value in receiving beacon/probe-response.  So we save encoded FH chanset
     into channel in 802.11 common bss information for now.
2001-09-19 04:09:54 +00:00
onoe 6a617566bc Move IEEE 802.11 MAC management functions from awi driver to
if_ieee80211subr.c, which can be shared between any IEEE 802.11
drivers.
However, most of current working IEEE 802.11b wireless LAN cards
have rich firmware and we cannot have a control to management frames
for such cards.

IBSS creation is now supported for the awi driver.
2001-09-18 09:09:57 +00:00
bjh21 5ddc1e1310 Add retry mechanisms for Econet, so that if a four-way handshake doesn't
complete for some reason, we defer it for a bit and then try again.  This
gets ping down to 0% packet loss.

Of course, ping _should_ have been at 0% packet loss anyway, and that's the
next thing to deal with.
2001-09-17 22:41:59 +00:00
thorpej d679590033 Split the pre-computed ifnet checksum flags into Tx and Rx directions.
Add capabilities bits that indicate an interface can only perform
in-bound TCPv4 or UDPv4 checksums.  There is at least one Gig-E chip
for which this is true (Level One LXT-1001), and this is also the
case for the Intel i82559 10/100 Ethernet chips.
2001-09-17 17:26:59 +00:00
wiz 456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
bjh21 33d596bef8 Add support for incoming IP broadcast packets. The protocol for this is
worked out by observing RISC iX's behaviour, so it may be technically
wrong.  The only implementations of IP-over-Econet for which I've got
sources don't support broadcasts.

Tested using broadcast ping from RISC iX to NetBSD, and using rwhod.
2001-09-16 15:08:39 +00:00
bjh21 0f810d8948 eco_input():
Use m_copydata() to preserve the Econet header, so we don't depend on
  notionally-unused areas of an mbuf remaining untouched.
  Check that ARP-over-Econet requests are exactly eight bytes long.
  Use m_pullup() before trusting mtod().

Between them, these make reception of unicast ARP responses work properly.
2001-09-16 12:16:50 +00:00