Commit Graph

1190 Commits

Author SHA1 Message Date
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
ichiro
64c73d799a missing ')' 2003-06-29 10:13:11 +00:00
darrenr
42091f2362 From OpenBSD 1.33-1.34:
When using bpf(4) in immediate mode, and using kevent(2) to receive
notification of packet arrival, the usermode application isn't notified
until a second packet arrives.

This is because KNOTE() calls filt_bpfread() before bd_slen has been
updated with the newly arrived packet length, so it looks like there
is no data there.

Moving the bpf_wakeup() call for immediate mode to after bd_slen is set
fixes it.

From: wayne@epipe.com.au in pr 3175
2003-06-28 17:33:02 +00:00
darrenr
960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
oki
955ac53d91 Put correct dest ether address on PPPoE server mode. 2003-06-27 16:24:32 +00:00
tron
706af04c5c Test for symbol "_KERNEL_OPT" instead of "_LKM" as suggested by
Matthew Green.
2003-06-26 08:22:06 +00:00
tron
88613ffb5e Don't include "opt_mbuftrace.h" if "_LKM" is defined. This fixes a build
problem in the "vmware-module3" package.
2003-06-26 06:52:55 +00:00
itojun
df0f79e5b1 recover code that requires exact match on rtm_change/lock (lost in 1.16).
without it "route change X" would change less-specific route by mistake.
reported by jinmei@kame
2003-06-24 08:31:32 +00:00
martin
4858ba3d93 Protect kernel opt_*.h include by #ifdef _KERNEL_OPT 2003-06-23 12:56:07 +00:00
martin
d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
itojun
b6625c38a4 avoid panic in malloc() under extremely low memory situation.
OpenBSD problem report 2235, 2236, 2640.  fix by Otto Moerbeek.
2003-06-19 06:25:41 +00:00
oki
6873b338d6 Add support in-kernel PPPoE server.
This may work with one PPPoE session.
If you want to use it, #define PPPOE_SERVER in somewhere,
or add options PPPOE_SERVER in kernel config file.

This is experimental code, and good start point for future development.
2003-06-18 08:12:51 +00:00
martin
096ea30c09 Add NETATALK to the list to check if we bail because no ARP is configured. 2003-06-11 10:44:10 +00:00
martin
7f550781cc Fix typpo in #error message. Noted by Pawel Chwalowski in PR 21853. 2003-06-11 10:34:55 +00:00
dyoung
148258d56c Don't call ieee80211_chan2ieee, we don't have it, yet. 2003-05-31 19:37:15 +00:00
kristerw
dcfad96372 Make sure splx() is called for all bridge_ioctl() error cases. 2003-05-24 14:22:14 +00:00
itojun
8228c94987 don't call if_free_sadl() until very end of if_detach() logic. many of
routing table manipulation code assumes the presense of AF_LINK sockaddr.
should fix PR 21581
2003-05-23 10:06:17 +00:00
christos
0b736391e8 add COMPAT_ULTRIX where necessary. Thanks gimpy! 2003-05-19 22:17:24 +00:00
itojun
abf7c0c6f1 AF_LINK sockaddr has to be attached to ifp->if_addrlist until the end,
as many of the code assumes that TAILQ_FIRST(ifp->if_addrlist) is non-null.
2003-05-16 16:57:09 +00:00
itojun
4008ec1218 use strlcpy 2003-05-16 03:56:49 +00:00
dyoung
045ad0db5e IEEE80211_LOCK and WI_LOCK conceal enormous differences in locking
semantics on FreeBSD and NetBSD, so I am backing them out until
the macro set is enriched.
2003-05-16 01:26:17 +00:00
itojun
b4542a20a6 use arc4random 2003-05-14 23:16:44 +00:00
itojun
ccc2f25972 no need to compile net_osdep.c. simplify net_osdep.h conditions (remove
bsdi/freebsd/openbsd stuff)
2003-05-14 22:45:02 +00:00
itojun
5ebd8c7eba remove #ifdef __FreeBSD__ (code already diverged enough) 2003-05-14 22:41:40 +00:00
itojun
ab4f0285a8 unifdef for readability/clarity. thorpej ok 2003-05-14 15:50:51 +00:00
itojun
346e0198f0 always use PULLDOWN_TEST codepath. 2003-05-14 06:47:33 +00:00
dyoung
541c2cdd2e Sync with FreeBSD. Spelling fix. Make ieee80211_decap a little more
readable. Accomodate both FreeBSD arpcom and NetBSD ethercom with
conditional compilation.
2003-05-13 10:05:05 +00:00
dyoung
15c573fc50 Verify beacon/probe response information elements to prevent buffer
overflows.
2003-05-13 09:53:07 +00:00
dyoung
8c01544ced Pack rates, SSID using helper routines ieee80211_add_{rates,ssid}
instead of reduplicating code. From Sam Leffler/FreeBSD.
2003-05-13 09:47:44 +00:00
dyoung
d3f1cc6bf2 Add utility routine ieee80211_get_rate(). 2003-05-13 09:31:56 +00:00
dyoung
1786077eef Begin sync with 802.11 framework in FreeBSD: adopt macros for
locking.
2003-05-13 09:22:31 +00:00
dyoung
9302269223 Define an 802.11 PLCP header and constants.
Define two new status codes for management frames.

Define 802.11 durations of important frame sequences, as will be
needed for ADMtek ADM8211 driver and others.
2003-05-13 05:51:46 +00:00
dyoung
7383a96ca6 Fix two bugs: supported rates elements were assembled incorrectly,
and the 'no recent beacons from %s' message told the wrong BSSID.
2003-05-13 05:43:43 +00:00
grant
6ecb99a75c fix grammatical error in a diagnostic message. 2003-05-06 17:54:27 +00:00
enami
9595f6d722 Initialize mb.m_data. 2003-05-06 09:59:35 +00:00
itojun
860a851ea8 KNF 2003-05-02 03:15:23 +00:00
itojun
5576ac2656 bpf_mtap() does not care about M_PKTHDR at the top. M_COPY_PKTHDR has some
consequences, so avoid it.  if we need to attach dummy headers, we should
use M_PREPEND instead.
2003-05-01 07:52:58 +00:00
itojun
8c6d963459 don't be too verbose on nd6_storelladdr failure 2003-05-01 07:41:59 +00:00
itojun
8466cf281c consistency; use tokenbroadcastaddr, not ether*. 2003-05-01 02:34:20 +00:00
bjh21
ca2c1040cf Expose IF_NAMESIZE for POSIX and X/Open applications. 2003-04-30 18:50:26 +00:00
bjh21
4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
bjh21
c4987984da Accept standard IEEE 802.3 names for Ethernet medium types.
Suggested by Christos, IIRC.
2003-04-23 23:16:43 +00:00
salo
f35804411a depreceated->deprecated 2003-04-17 22:55:29 +00:00
kml
0ad9e0dccc Host AP power saving support. The Host AP notices that the power
saving bit is set in incoming frames from a station, and buffers the
outgoing frames for the station until they are polled for.  This
requires support in the driver to set a bit in the TIM bitmap sent
during 802.11 beacons.

So far, support for power saving in Host AP mode is only available
for the PRISM2 chipset.
2003-04-08 04:31:23 +00:00
christos
e950c1ac8f PR/20844: Iain Hibbert: PPP Compressors cannot be loaded as LKM 2003-03-27 17:50:06 +00:00
bouyer
013798abf2 Make promiscous mode work on vlans: introduce a new link-layer m_flag
M_PROMISC. In ether_input(), flag packets comming from an interface in
promiscous mode which are not for us M_PROMISC instead of droping them.
Drop M_PROMISC packets which are not passed to vlan_input(). M_PROMISC
packets passed to vlan_input() will be looped back to ether_input()
the M_PROMISC flag will be handled appropriately.
Clear M_PROMISC before giving the packet to bridge, as bridge has its own
checks for local MAC addresses.
This also makes bridges on vlan working.
2003-03-25 13:29:39 +00:00
bouyer
4a3c894eef Fix 2 bugs:
- initialise stp when the bridge is turned up, without this stp will keep
  all interfaces disabled in a sequence like:
  brconfig bridge0 add if0 add if1 stp if0 stp if1 up
- s/BRDGSPRI/BRDGSIFPRIO in brconfig.c:cmd_ifpriority()

add a command (ifpathcost) to change the stp path cost of the STP path cost of
an interface. Display the interface path cost with the others STP parameters.
2003-03-19 10:34:33 +00:00
matt
e2765c0933 Allow a machine-dependent definition of schednetisr. 2003-03-15 07:51:06 +00:00
dsl
30630417a8 Validate pgid arg to TIOCSPGRP 2003-03-13 10:24:38 +00:00
dsl
53d2320e25 Check that the process/process group id passed to TIOCSPRP is in the session
of the current process.
2003-03-13 10:18:35 +00:00