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.
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.
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.
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).
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>.
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.
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.
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.
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.
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.
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.
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.
protocols, and lacking any timeouts, but it basically works, doing four-way
handshakes in both directions and incoming Machine Peek operations.
Oh, and Econet is Acorn's ancient, proprietary 500kbit/s networking
technology.
on gateway change, copy rmx_mtu from gateway only under the following condition:
- current MTU is not locked
- current MTU was discovered via PMTUD
XXX if gateway has MTU == 0, current MTU is set to 0 and we are going to
rediscover PMTU again. is it good or bad?
the bit mask of open NCPs got out of sync.
Defer the (potential) closing of LCP after a NCP went down until after
the state machines got updated.
This fixes PR kern/11161.
follows BSD/OS practice and ucd-snmp code (FreeBSD does it for specific
interfaces only).
was: if_lastchange get updated on every packet transmission/receipt.
now: if_lastchange get updated when IFF_UP is changed.
the broadcast case as well) to see if they came from us, and drop
them if they did.
This fixed IPv6 DAD on non-simplex interfaces, e.g. the Seeq 8003
found on my SGI Indy.
network interfaces. This works by pre-computing the pseudo-header
checksum and caching it, delaying the actual checksum to ip_output()
if the hardware cannot perform the sum for us. In-bound checksums
can either be fully-checked by hardware, or summed up for final
verification by software. This method was modeled after how this
is done in FreeBSD, although the code is significantly different in
most places.
We don't delay checksums for IPv6/TCP, but we do take advantage of the
cached pseudo-header checksum.
Note: hardware-assisted checksumming defaults to "off". It is
enabled with ifconfig(8). See the manual page for details.
Implement hardware-assisted checksumming on the DP83820 Gigabit Ethernet,
3c90xB/3c90xC 10/100 Ethernet, and Alteon Tigon/Tigon2 Gigabit Ethernet.
based on the existing net/if_spppsubr.c stuff.
While there are completely userland (bpf based) implementations available,
those have a vastly larger per packet overhead thus causing major CPU
overhead and higher latency. On an i386 base router, running a 486DX at 50MHz
my line (768kBit/s downstream) was limited to something (varying) between 10
and 20 kByte/s effective download rate. With this implementation I get full
bandwidth (~85kByte/s).
This is client side only. Arguably the right way to add full PPPoE support
(including server side) would be a variation of the ppp line discipline and
appropriate modifications to pppd. I promise every help I can give to anyone
doing that - but I needed this realy fast. Besids, on low memory NAT boxes
with typically a single PPPoE connection, this implementation is more
lightweight than a pppd based one, which nicely fits my needs.
In this mode, the PPP packets start with the protocol identifier and don't
have any explicit framing (which may be added by the lower level driver).
Make input/output statistics a little bit more correct by adding a hardware
driver adjustable framing length for each packet (instead of the constant
value "3" used before).
While there, bump authentication name length from 32 to 48 (I have a
connection where I need more than 32). XXX - this should not be artificialy
limited at all.
tree, which allows a packet with Ethernet headers already present to
run through the ALTQ packet classifier. This is needed in order to
suport ALTQ on VLAN and bridge devices.
adds rt_parent to link parent from child (like NRL did, ours do refcnt
rt_refcnt properly).
bsdi rt_walkbranch would speedup the processing, but since the code will not
be visited too frequently, the current code (with rt_walktree) should be okay.
let static routes overwrite cloned routes, as cloned routes can come back again
if necessary. behavior same as freebsd/bsdi, code partially from bsdi42.
(NRL rt->rt_parent was not added)
should fix PR 11916 and maybe some other PRs with ARP behavior.
recompilation of usr.sbin/route6d is suggested.
have sys/net/route.c:rtrequest1(), which takes rt_addrinfo * as the argument.
pass rt_addrinfo all the way down to rtrequest, and ifa->ifa_rtrequest.
3rd arg of ifa->ifa_rtrequest is now rt_addrinfo * instead of sockaddr *
(almost noone is using it anyways).
benefit: the follwoing command now works. previously we need two route(8)
invocations, "add" then "change".
# route add -inet6 default ::1 -ifp gif0
remove unsafe typecast in rtrequest(), from rtentry * to sockaddr *. it was
introduced by 4.3BSD-reno and never corrected.
XXX is eon_rtrequest() change correct regarding to 3rd arg?
eon_rtrequest() and rtrequest() were incorrect since 4.3BSD-reno,
so i do not have correct answer in the source code.
someone with more clue about netiso-over-ip, please help.
the link level name for the interface (ifp->if_sadl) is allocated
before ifp->if_addrlen is initialized, which could lead to allocating
too little space for the link level address.
Do this by splitting allocation of the link level name out of
if_attach() and into if_alloc_sadl(), which is normally called
by functions like ether_ifattach(). Network interfaces which
don't have a link-specific attach routine must call if_alloc_sadl()
themselves (example: gif).
Link level names are freed by if_free_sadl(), which can be called
from e.g. ether_ifdetach(). Drivers never need call if_free_sadl()
themselves as if_detach() will do it if it is not already done.
While here, add the ability to pass an AF_LINK address to
SIOCSIFADDR in ether_ioctl() (this is what caused me to notice
the problem that the above fixes).
Defer output processing to the software interrupt.
Note, that in the process of doing this, I discovered several
very broken things about this driver, which are not fixed with
this commit. It should work as well as it previously did, but
this code could be seriously improved. As soon as I can find
my second Metricom radio, I'll give it a proper shakedown.
Once we have a complete frame, schedule a STRIP software interrupt,
and manipulate ipintrq from there. This will allow us to clean up
the use of splimp() in this file later.
Rumors say there are archs without ISA busses, so avoid including
(uneccesarily) isa bus headers in MI files.
XXX this is the minimal solution, layer interface calls will have
XXX to be revisited later
"key" and a "dlt", use a "type" (PFIL_TYPE_{AF,IFNET} for now) and
a val/ptr appropriate for that type. This allows for more future
flexibility with the pfil_hook mechanism.