When a request is made to register a filter on a fifo that doesn't
apply to the fifo (i.e., not EVFILT_READ or EVFILT_WRITE), reject
it as EINVAL, not by returning 1 (EPERM).
Approved by: re (kensmith)
Remove DFLAG_SEEKABLE from fifo file descriptors: fifos are not seekable
according to POSIX, not to mention the fact that it doesn't make sense
(and hence isn't really implemented). This causes the fifo_misc
regression test to succeed.
Approved by: re (scottl)
Only poll the fifo for read events if the fifo is attached to a readable
file descriptor. Otherwise, the read end of a fifo might return that it
is writable (which it isn't).
Only poll the fifo for write events if the fifo attached to a writable
file descriptor. Otherwise, the write end of a fifo might return that
it is readable (which it isn't).
In the event that a file is FREAD|FWRITE (which is allowed by POSIX, but
has undefined behavior), we poll for both.
Approved by: re (kensmith)
After going to some trouble to identify only the write-related events
to poll the write socket for, the fifo polling code proceeded to poll
for the complete set of events. Use 'levents' instead of 'events' as
the argument to poll, and only poll the write socket if there is
interest in write events.
Approved by: re (kensmith)
Add an assertion that fifo_open() doesn't race against other threads
while sleeping to allocate fifo state: due to using the vnode lock to
serialize access to a fifo during open, it shouldn't happen (tm).
Approved by: re (kensmith)
Rather than reaching into the internals of the UNIX domain socket code
by calling uipc_connect2() to connect two socket endpoints to create a
fifo, call soconnect2().
Approved by: re (kensmith)
``Process one NMI interrupt per handler invocation as the processor
buffers pending NMIs from multiple interrupting PMCs and delivers
them serially.''
Approved by: re (kensmith)
Even if there are no valid keys in metadata, but provider is attached
we can still use setkey subcommand.
Found by: regression tests
Approved by: re (scottl)
When bge_stop() is called from bge_detach(), mii is already NULL, so check
before trying to use it.
This fix allows to 'kldunload if_bge' without panicing.
Reviewed by: bz
Approved by: re (scottl)
Add gem(4) to the list of devices supporting VLAN-sized frames natively
(since sys/dev/gem/if_gem.c rev. 1.34, MFC'ed in rev. 1.29.2.4).
Approved by: re (scottl)
- Allow for VLAN-sized frames and set IFCAP_VLAN_MTU.
- On resume all registers have to be initialized again like after
power-on so reset sc_inited in gem_suspend() in order get all of
the registers set next time gem_init_regs() is called.
- On at least some ERI and GEM revisions GEM_MAC_RX_OVERFLOW happen
often due to a silicon bug and re-initializing is all we can do
about these errors so make handling them non-verbose.
- Remove a superfluous memset(3) call in gem_meminit(), all elements
are initialized to 0 anyway.
Approved by: re (scottl)
When padding with zero, do pad after prefixes rather than padding
before prefixes.
Use cases:
printf("%05d", -42); --> "00-42" (should be "-0042")
printf("%#05x", 12); --> "000xc" (should be "0x00c")
Submitted by: Oliver Fromme
PR: kern/85520
Approved by: re (kensmith)
nd6.c, r1.55; nd6_nbr.c, r1.33
> Add support for multicast to the bridge and allow inet6 addresses to be
> assigned to the interface.
>
> IPv6 auto-configuration is disabled. An IPv6 link-local address has a
> link-local scope within one link, the spec is unclear for the bridge case and
> it may cause scope violation.
>
> An address can be assigned in the usual way;
> ifconfig bridge0 inet6 xxxx:...
>
> Tested by: bmah
> Reviewed by: ume (netinet6)
> Approved by: mlaier (mentor)
Approved by: re (kensmith), mlaier (mentor)
- Do not hold route entry lock, when calling arprequest(). One such
call was introduced by me in 1.139, the other one was present before.
- Do all manipulations with rtentry and la before dropping the lock.
- Copy interface address from route into local variable before dropping
the lock. Supply this copy as argument to arprequest().
(LOR Ids in original commit message.)
Approved by: re (scottl)
Comment out ofw_console 'screen' entry and zs tty entries.
The OpenFirmware console isn't used on real systems anymore and
I never get to multi-user mode in psim. There are problems with
zs that need to be resolved before these lines can be enabled.
This eliminates disconcerting warnings on boot.
Approved by: re (Ken Smith)
Fix boot-time hang/panic on G3 systems when modifying IBAT0 in
pmap_bootstrap by using the sync;isync big hammer to make sure
all prior operations have completed.
Reported by: Nathan Whitehorn <nathan at uchicago edu>
Approved by: re (Ken Smith)
Fix an item leak, that happens when some node calls ng_callout() two
times consequently, without checking whether callout has been serviced
or not. (ng_pptpgre and ng_ppp were catched in this behavior).
- In ng_callout() save old item before calling callout_reset(). If the
latter has returned 1, then free this item.
- In ng_uncallout() clear c->c_arg.
Problem reported by: Alexandre Kardanev
Approved by: re (kensmith)
Make callout_reset() return a non-zero value if a pending callout
was rescheduled. If there was no pending callout, then return 0.
Reviewed by: iedowse, cperciva
Approved by: re (kensmith)
When a carp(4) interface is being destroyed and is in a promiscous mode,
first interface is detached from parent and then bpfdetach() is called.
If the interface was the last carp(4) interface attached to parent, then
the mutex on parent is destroyed. When bpfdetach() calls if_setflags()
we panic on destroyed mutex.
To prevent the above scenario, clear pointer to parent, when we detach
ourselves from parent.
Approved by: re (kensmith)
pf_ioctl.c Revision 1.153 Sun Aug 7 11:37:33 2005 UTC by dhartmei
| verify ticket in DIOCADDADDR, from Boris Polevoy, ok deraadt@
pf_ioctl.c Revision 1.158 Mon Sep 5 14:51:08 2005 UTC by dhartmei
| in DIOCCHANGERULE, properly initialize table, if used in NAT rule.
| from Boris Polevoy <vapcom at mail dot ru>, ok mcbride@
pf.c Revision 1.502 Mon Aug 22 11:54:25 2005 UTC by dhartmei
| when nat'ing icmp 'connections', replace icmp id with proxy values
| (similar to proxy ports for tcp/udp). not all clients use
| per-invokation random ids, this allows multiple concurrent
| connections from such clients.
| thanks for testing to Rod Whitworth, "looks ok" markus@
pf.c Revision 1.501 Mon Aug 22 09:48:05 2005 UTC by dhartmei
| fix rdr to bitmask replacement address pool. patch from Max Laier,
| reported by Boris Polevoy, tested by Jean Debogue, ok henning@
Approved by: re (scottl)
The number of raid controllers that violate the WHQL seems to be
growing in number and not isolated to old versions as previously
thought. Though the numbers of these seen in the wild is still
relatively small, they hang the system when parts of their devices are
powered down. The one area that these parts appear often are in the
higher end servers. As such, be conservative about powering down
devices that have no driver attached by default. Until a better
approach is proven in current, this is the prudent choice.
Laptop users wishing the benefits of powering down devices with no
drivers will now need to set hw.pci.do_powerstate=1 in their
/boot/loader.conf file. Some users will have devices that will
prevent this setting (hence the need to make it default 0).
Approved by: re@ (scottl)
src/sys/kern/kern_shutdown.c 1.175
src/sys/sys/buf.h 1.189
Modified files:
sys/gnu/fs/ext2fs fs.h
sys/kern kern_shutdown.c
sys/sys buf.h
Log:
Add a new struct buf flag bit, B_PERSISTENT, and use it to tag
struct bufs that are persistently held by ext2fs. Ignore any buffers
with this flag in the code in boot() that counts "busy" and dirty
buffers and attempts to sync the dirty buffers, which is done before
attempting to unmount all the file systems during shutdown.
This fixes the problem caused by any ext2fs file systems that are
mounted at system shutdown time, which caused boot() to give up on
a non-zero number of buffers and skip the call to vfs_unmountall().
This left all the mounted file systems in a dirty state and caused
them to all require cleanup by fsck on reboot.
Move the two separate copies of the "busy" buffer test in boot()
to a separate function.
Nuke the useless spl() stuff in the ext2fs ULCK_BUF() macro.
Bring the PRINT_BUF_FLAGS definition in sys/buf.h up to date with
this and previous flag changes.
PR: kern/56675, kern/85163
Tested by: "Matthias Andree" matthias.andree at gmx.de
Reviewed by: bde
MFC after: 3 days
PR: kern/56675, kern/85163
Tested by: "Hanspeter Roth" hampi at rootshell.be
Tested by: "Matthias Andree" matthias.andree at gmx.de
Reviewed by: bde
Approved by: re (scottl)
Reflect a recent change in /etc/rc.subr that made ``-M''
appear in tmpmfs and varmfs default flags explicitly.
Explain why -M is good for these file systems (it maximizes
performance and makes the system more stable at low memory
conditions by reducing the chance of thrashing.)
Bump .Dd accordingly.
Approved by: re (hrs)
etc/network.subr: 1.165-1.167
- kill removable_interfaces
- add NOAUTO keyword
- fix quoted entries in ifconfig_<ifn> variables
- always up the interface
- if ifconfig_<ifn> is defined, but empty, don't set it to
ifconfig_DEFAULT
- always configure lo0 first if it exists
etc/pccard_ether: 1.46
- kill removable_interfaces
- add NOAUTO keyword
etc/rc.d/netif: 1.15-1.17
- block Ctrl-C in dhclient
- minor cleanup of the interface list generation code
Approved by: re (scottl)
Requested by: many (death to removable_interfaces!)
sbin/dhclient/*.c:
- add __FBSDID
sbin/dhclient/conflex.c: 1.3-1.4
- fix a minor buffer overflow in config parsing
- actually support backslash escaping in config files
bin/dhclient/dhclient-script: 1.6-1.10
- don't create or remove routes to our address through 127.0.0.1
- improved detection of the interface of the default route
- support quotes in the medium string
- clear interface state more effectively on failure
- don't update resolv.conf when unchanged
bin/dhclient/dhclient.c: 1.10-1.11
- validate domain-name (used as resolv.conf search string)
- handle superseded subnet-mask correctly
Approved by: re (scottl)