sam [Sat, 13 Aug 2005 17:31:48 +0000 (17:31 +0000)]
Extend acl support to pass ioctl requests through and use this to
add support for getting the current policy setting and collecting
the list of mac addresses in the acl table.
Submitted by: Michal Mertl (original version)
MFC after: 2 weeks
cperciva [Sat, 13 Aug 2005 16:27:13 +0000 (16:27 +0000)]
Allow multiple commands to be specified on a single command line, e.g.,
"portsnap fetch update" or "portsnap -I cron update". They will be
executed in the order that they appear, and duplicates are not removed
(so "portsnap fetch fetch fetch fetch" is meaningful, albeit rather
silly).
bz [Sat, 13 Aug 2005 11:02:34 +0000 (11:02 +0000)]
* Add dynamic sysctl for net.inet6.ip6.fw.
* Correct handling of IPv6 Extension Headers.
* Add unreach6 code.
* Add logging for IPv6.
Submitted by: sysctl handling derived from patch from ume needed for ip6fw
Obtained from: is_icmp6_query and send_reject6 derived from similar
functions of netinet6,ip6fw
Reviewed by: ume, gnn; silence on ipfw@
Test setup provided by: CK Software GmbH
MFC after: 6 days
stefanf [Sat, 13 Aug 2005 07:59:46 +0000 (07:59 +0000)]
Forced commit due to wrong commit-log file:
- Provide missing prototypes and variable declarations in arith.h, include
arith.h.
- Make arith_assign() and yyerror() static.
des [Fri, 12 Aug 2005 12:48:50 +0000 (12:48 +0000)]
Change directory one level at a time, and use CDUP to back out. This is a
work in progress; it partially fixed bin/83278 and is a prerequisite to
fixing bin/83277.
rodrigc [Fri, 12 Aug 2005 02:38:20 +0000 (02:38 +0000)]
Add NATM_LOCK() and NATM_UNLOCK() in places where npcb_add() and
npcb_free() are called, in order to eliminate witness panics.
This was overlooked in removal of GIANT from ATM.
markus [Thu, 11 Aug 2005 15:51:11 +0000 (15:51 +0000)]
- Clarify how events are used and how the different event sysctl correlate
- Document how an event looks like that is received by devd(8) from acpi_ibm(4)
- Document the event codes as they occur on a T41p
- Add a note about sysctl.conf and an Xref to it
- Add an example section providing an example script and an entry for
devd.conf. This is an adapted version of the one in acpi_fujitsu(4).
- s/Fn-F4/Fn+F4/ for consistency sake
- Add a button description where refering to a T41p, remove it otherwise,
since it might vary from model to model
- Bump .Dd
yar [Thu, 11 Aug 2005 14:45:10 +0000 (14:45 +0000)]
Fix stand-alone (or MODULES_WITH_WORLD=1) build of
the procfs module by creating opt_compat.h with
appropriate compatibility options: COMPAT_43 on all
arch's and COMPAT_IA32 in addition on amd64.
glebius [Thu, 11 Aug 2005 08:25:48 +0000 (08:25 +0000)]
o Fix a race between three threads: output path,
incoming ARP packet and route request adding/removing
ARP entries. The root of the problem is that
struct llinfo_arp was accessed without any locks.
To close race we will use locking provided by
rtentry, that references this llinfo_arp:
- Make arplookup() return a locked rtentry.
- In arpresolve() hold the lock provided by
rt_check()/arplookup() until the end of function,
covering all accesses to the rtentry itself and
llinfo_arp it refers to.
- In in_arpinput() do not drop lock provided by
arplookup() during first part of the function.
- Simplify logic in the first part of in_arpinput(),
removing one level of indentation.
- In the second part of in_arpinput() hold rtentry
lock while copying address.
o Fix a condition when route entry is destroyed, while
another thread is contested on its lock:
- When storing a pointer to rtentry in llinfo_arp list,
always add a reference to this rtentry, to prevent
rtentry being destroyed via RTM_DELETE request.
- Remove this reference when removing entry from
llinfo_arp list.
o Further cleanup of arptimer():
- Inline arptfree() into arptimer().
- Use official queue(3) way to pass LIST.
- Hold rtentry lock while reading its structure.
- Do not check that sdl_family is AF_LINK, but
assert this.
Reviewed by: sam
Stress test: http://www.holm.cc/stress/log/cons141.html
Stress test: http://people.freebsd.org/~pho/stress/log/cons144.html
glebius [Thu, 11 Aug 2005 08:14:53 +0000 (08:14 +0000)]
o Make rt_check() function more strict:
- rt0 passed to rt_check() must not be NULL, assert this.
- rt returned by rt_check() must be valid locked rtentry,
if no error occured.
o Modify callers, so that they never pass NULL rt0
to rt_check().
alc [Thu, 11 Aug 2005 02:22:55 +0000 (02:22 +0000)]
Decouple the unrefing of a page table page from the removal of a pv entry.
In other words, change pmap_remove_entry() such that it no longer unrefs
the page table page. Now, it only removes the pv entry.
jhb [Wed, 10 Aug 2005 20:21:29 +0000 (20:21 +0000)]
- Remove pre-new-bus code under #if 0 and some other rotted code under
#if 0.
- Use pci_enable_busmaster() to enable busmastering instead of frobbing
the command register directly.
- Don't check to see if memory or I/O can be enabled by writing to the
command register. The PCI bus driver's bus_alloc_resource() method
already checks this and will fail if it can't enable the bit.
jhb [Wed, 10 Aug 2005 20:15:56 +0000 (20:15 +0000)]
- Use if_printf() and device_printf() instead of outputting my%d:
everywhere. This means that my_unit is no longer used as well. The
watchdog routine now also prints 'my0: ...' rather than 'm0x0: ...'.
- Don't bzero the softc and don't try to free it in detach or if attach
fails.
- A whitespace fix.
jhb [Wed, 10 Aug 2005 20:12:25 +0000 (20:12 +0000)]
- Use callout_init_mtx() to close races between hme_stop() and hme_tick().
- Use the driver lock instead of Giant in a bus dma callback.
- Clear IFF_DRV_(RUNNING|OACTIVE) in hme_stop() instead of just clearing
RUNNING in hme_ioctl() to be more like other ethernet drivers.
- Lock the driver lock around mii operations.
- Remove spls.
- Cleanup locking in hme_ioctl().
sam [Wed, 10 Aug 2005 17:42:13 +0000 (17:42 +0000)]
Don't use ic_curmode to decide when to do 11g station accounting,
use the station channel properties. Fixes assert failure/bogus
operation when an ap is operating in 11a and has associated stations
then switches to 11g.
sam [Wed, 10 Aug 2005 16:22:30 +0000 (16:22 +0000)]
Clarify/fix handling of the current channel:
o add ic_curchan and use it uniformly for specifying the current
channel instead of overloading ic->ic_bss->ni_chan (or in some
drivers ic_ibss_chan)
o add ieee80211_scanparams structure to encapsulate scanning-related
state captured for rx frames
o move rx beacon+probe response frame handling into separate routines
o change beacon+probe response handling to treat the scan table
more like a scan cache--look for an existing entry before adding
a new one; this combined with ic_curchan use corrects handling of
stations that were previously found at a different channel
o move adhoc neighbor discovery by beacon+probe response frames to
a new ieee80211_add_neighbor routine
stefanf [Wed, 10 Aug 2005 13:38:01 +0000 (13:38 +0000)]
Submitted to and merged from NetBSD (rev. 1.23 and 1.24):
- Don't delete the current line when typing `yy'.
- Don't use a possibly stale pointer in cv_paste().
-
tegge [Wed, 10 Aug 2005 00:17:36 +0000 (00:17 +0000)]
Don't allow pagedaemon to skip pages while scanning PQ_ACTIVE or PQ_INACTIVE
due to the vm object being locked.
When a process writes large amounts of data to a file, the vm object associated
with that file can contain most of the physical pages on the machine. If the
process is preempted while holding the lock on the vm object, pagedaemon would
be able to move very few pages from PQ_INACTIVE to PQ_CACHE or from PQ_ACTIVE
to PQ_INACTIVE, resulting in unlimited cleaning of dirty pages belonging to
other vm objects.
Temporarily unlock the page queues lock while locking vm objects to avoid lock
order violation. Detect and handle relevant page queue changes.
This change depends on both the lock portion of struct vm_object and normal
struct vm_page being type stable.
jhb [Tue, 9 Aug 2005 21:53:26 +0000 (21:53 +0000)]
Call tulip_start() rather than tulip_ifstart() from the interrupt handler
to avoid recursing on the driver lock. Not sure why my test box didn't
catch this earlier.
rwatson [Tue, 9 Aug 2005 17:19:21 +0000 (17:19 +0000)]
Add helper function ip_findmoptions(), which accepts an inpcb, and attempts
to atomically return either an existing set of IP multicast options for the
PCB, or a newlly allocated set with default values. The inpcb is returned
locked. This function may sleep.
Call ip_moptions() to acquire a reference to a PCB's socket options, and
perform the update of the options while holding the PCB lock. Release the
lock before returning.
Remove garbage collection of multicast options when values return to the
default, as this complicates locking substantially. Most applications
allocate a socket either to be multicast, or not, and don't tend to keep
around sockets that have previously been used for multicast, then used for
unicast.
This closes a number of race conditions involving multiple threads or
processes modifying the IP multicast state of a socket simultaenously.
rwatson [Tue, 9 Aug 2005 13:27:50 +0000 (13:27 +0000)]
Add an order between UDP inpcb locks and the IPv4 multicast address
list lock, as there has been a report that an alternative lock order
is getting introduced. This should help ferret it out.
Reported by: Ed Maste <emaste at phaedrus dot sandvine dot ca>