qingli [Tue, 5 Jan 2010 22:33:10 +0000 (22:33 +0000)]
MFC r201285
Consolidate the route message generation code for when address
aliases were added or deleted. The announced route entry for
an address alias is no longer empty because this empty route
entry was causing some route daemon to fail and exit abnormally.
qingli [Tue, 5 Jan 2010 22:28:23 +0000 (22:28 +0000)]
MFC r201284
Multiple IPv6 addresses of the same prefix can be installed on the
same interface. The first address will install the prefix route into
the kernel routing table and that prefix will be marked as on-link.
Without RADIX_MPATH enabled, the other address aliases of the same
prefix will update the prefix reference count but no other routes
will be installed. Consequently the prefixes associated with these
addresses would not be marked as on-link. As such, incoming packets
destined to these address aliases will fail the ND6 on-link check
on input. This patch fixes the above problem by searching the kernel
routing table and try to find an on-link prefix on the given interface.
qingli [Tue, 5 Jan 2010 22:14:55 +0000 (22:14 +0000)]
MFC r201282, r201543
r201282
-------
The proxy arp entries could not be added into the system over the
IFF_POINTOPOINT link types. The reason was due to the routing
entry returned from the kernel covering the remote end is of an
interface type that does not support ARP. This patch fixes this
problem by providing a hint to the kernel routing code, which
indicates the prefix route instead of the PPP host route should
be returned to the caller. Since a host route to the local end
point is also added into the routing table, and there could be
multiple such instantiations due to multiple PPP links can be
created with the same local end IP address, this patch also fixes
the loopback route installation failure problem observed prior to
this patch. The reference count of loopback route to local end would
be either incremented or decremented. The first instantiation would
create the entry and the last removal would delete the route entry.
r201543
-------
The IFA_RTSELF address flag marks a loopback route has been installed
for the interface address. This marker is necessary to properly support
PPP types of links where multiple links can have the same local end
IP address. The IFA_RTSELF flag bit maps to the RTF_HOST value, which
was combined into the route flag bits during prefix installation in
IPv6. This inclusion causing the prefix route to be unusable. This
patch fixes this bug by excluding the IFA_RTSELF flag during route
installation.
jhb [Tue, 5 Jan 2010 18:25:41 +0000 (18:25 +0000)]
MFC 201196:
Change vlan interfaces to cope more usefully with the parent interface being
renamed. Previously the vlan interfaces would lose their configuration as if
the parent interface had been physically removed. Now vlan interfaces ignore
rename events.
- Add a new ifnet flag (IFF_RENAMING) that is set while an ifnet is being
renamed. This flag can be checked in ifnet departure/arrival event
handlers to treat rename events differently.
- Change the ifnet departure event handler in the if_vlan(4) driver to
ignore departure events due to a trunk interface being renamed.
jhb [Tue, 5 Jan 2010 17:04:14 +0000 (17:04 +0000)]
MFC 200847:
- Rename the __tcpi_(snd|rcv)_mss fields of the tcp_info structure to remove
the leading underscores since they are now implemented.
- Implement the tcpi_rto and tcpi_last_data_recv fields in the tcp_info
structure.
mav [Tue, 5 Jan 2010 13:56:58 +0000 (13:56 +0000)]
MFC 200968:
Make diskinfo report disk stripe size and offset. It should help users to
make file systems optimally aligned and tuned for better performance.
mav [Tue, 5 Jan 2010 13:49:18 +0000 (13:49 +0000)]
MFC r200940:
As soon as geom_raid3 reports it's own stripe as sector size, report largest
underlying provider's stripe, multiplied by number of data disks in array,
due to transformation done, as array stripe.
- Disallow setting of flags not supported by ext2fs.
- Map EXT2_APPEND_FL to SF_APPEND.
- Map EXT2_IMMUTABLE_FL to SF_IMMUTABLE.
- Map EXT2_NODUMP_FL to UF_NODUMP.
Note that ext2fs doesn't support user settable append and immutable flags.
EXT2_NODUMP_FL is an user settable flag also on Linux.
ed [Thu, 31 Dec 2009 10:53:04 +0000 (10:53 +0000)]
MFC r198185:
Print backspaces after echoing an EOF.
Applications like shells expect EOF to give no graphical output, while
our implementation prints ^D by default (tunable with stty echoctl).
Make the new implementation behave like the old TTY code. Print two
backspaces afterwards.
I totally forgot to MFC this, because the 8.0 freeze took a little
longer than I expected.
jh [Thu, 31 Dec 2009 07:34:38 +0000 (07:34 +0000)]
MFC r198291:
Unloading of the nfscl module is unsupported because newnfslock doesn't
support unloading. It's not trivial to implement newnfslock unloading so
for now just admit that unloading is unsupported and refuse to attempt
unload in all nfscl module event handlers.
jh [Thu, 31 Dec 2009 07:32:04 +0000 (07:32 +0000)]
MFC r198290:
Fix ordering of nfscl_modevent() and ncl_uninit(). nfscl_modevent() must
be called after ncl_uninit() when unloading the nfscl module because
ncl_uninit() uses ncl_iod_mutex which is destroyed in nfscl_modevent().
thompsa [Thu, 31 Dec 2009 00:10:26 +0000 (00:10 +0000)]
MFC r200653
Use the EVENTHANDLER system to hook into the usb device configuration and
perform a function such as ejecting a 3G autoinstaller disk. The eventhandler
system properly tracks threads and is safe to unload, remove the
setting/clearing of a function pointer in the kernel by u3g(4) which included a
tsleep for safety.
thompsa [Thu, 31 Dec 2009 00:09:47 +0000 (00:09 +0000)]
MFC r200652
If the runcount is non-zero in eventhandler_deregister() then one or more
threads are executing the eventhandler, sleep in this case to make it safe for
module unload. If the runcount was up then an entry would have been marked
EHE_DEAD_PRIORITY so use this as a trigger to do the wakeup in
eventhandler_prune_list().
dougb [Wed, 30 Dec 2009 19:36:40 +0000 (19:36 +0000)]
MFC r200743:
The service command is an easy interface to the rc.d system.
Its primary purpose is to start and stop services provided by
the rc.d scripts, however it can also be used to list the scripts
using various criteria.
MFC r200809, r200980, r201035, r201069, 201070:
Updates/fixes suggested after the initial introducition
jhb [Wed, 30 Dec 2009 17:53:07 +0000 (17:53 +0000)]
MFC 200919:
Fix a bug in gzipfs that prevented lseek() from working and add lseek()
support to bzip2fs. This fixes problems with loading compressed amd64
kernel modules containing debug symbols.
jh [Wed, 30 Dec 2009 17:22:00 +0000 (17:22 +0000)]
MFC r199844:
Reset path name back to original correctly in fts_build() when
FTS_NOCHDIR option is used. fts_build() could strip a trailing slash
from path name in post-order visit if a path pointing to an empty
directory was given for fts_open().
markus [Wed, 30 Dec 2009 16:37:58 +0000 (16:37 +0000)]
MFC r200992:
Use a local copy of entry_d for finding matches. Otherwise, if entry_d pointed
to an entry of 'acl', all ACL entries starting with entry_d would be deleted.
mav [Tue, 29 Dec 2009 21:23:18 +0000 (21:23 +0000)]
MFC r200821:
Make graid3 fallback to malloc() when component request size is bigger
then maximal prepared UMA zone size. This fixes crash with MAXPHYS > 128K.
dougb [Tue, 29 Dec 2009 07:08:48 +0000 (07:08 +0000)]
MFC r200448:
Since the change to rc.subr in r198162 it's not necessary to specify
command in the rc.d script if we have a corresponding ${name}_program
entry, which we do for named.
Rename named_precmd to named_prestart to make it more clear and match
convention.
Move the command_args definition related to -u up into _prestart().
It (and the associated $named_uid value) are only used there, and
unlike required_* and pidfile don't need to be used until this stage.
Fix a silly bug that would only have affected people who were using
the new named_wait or named_auto_forward features, AND had set up an
rndc.conf file instead of using the automatically generated rndc.key.
For named_conf:
Add "-c $named_conf" to command_args if it's not set to the
default. If it is set to the default and we're using the base
BIND it's not necessary. If we're using BIND from the ports
the user is likely to have included it in _flags (due to long
necessity for doing so) so don't duplicate that if it's set.
Add $named_conf to required_files
MFC r200563:
The named process needs to have a "working directory" that it can
write to. This is specified in "options { directory }" in named.conf.
So, create /etc/namedb/working with appropriate permissions, and
update the entry in named.conf to match.
In addition to specifying the working directory, file and path names
in named.conf can be specified relative to the directory listed.
However, since that directory is now different from /etc/namedb
(where the configuration, zone, rndc.*, and other files are located)
further update named.conf to specify all file names with fully
qualified paths. Also update the comment about file and path names
so users know this should be done for all file/path names in the file.
This change will eliminate the 'working directory is not writable'
messages at boot time without sacrificing security. It will also
allow for features in newer versions of BIND (9.7+) to work as
designed.
bz [Mon, 28 Dec 2009 14:40:58 +0000 (14:40 +0000)]
MFC r200473:
Throughout the network stack we have a few places of
if (jailed(cred))
left. If you are running with a vnet (virtual network stack) those will
return true and defer you to classic IP-jails handling and thus things
will be "denied" or returned with an error.
Work around this problem by introducing another "jailed()" function,
jailed_without_vnet(), that also takes vnets into account, and permits
the calls, should the jail from the given cred have its own virtual
network stack.
We cannot change the classic jailed() call to do that, as it is used
outside the network stack as well.
Discussed with: julian, zec, jamie, rwatson (back in Sept)
kib [Sun, 27 Dec 2009 20:39:58 +0000 (20:39 +0000)]
MFC r200038:
Properly support -fPIE by linking PIE binaries with specially-built
Scrt1.o instead of crt1.o, since the later is built as non-PIC.
Separate i386-elf crt1.c into the pure assembler part and C code,
supplying all data extracted by assembler stub as explicit parameters.
Hide and localize _start1 symbol used as an interface between asm and
C code.
delphij [Sun, 27 Dec 2009 07:04:27 +0000 (07:04 +0000)]
Explicitly say that this is an internal library which is intended to be
used within FreeBSD base system only, and discourage user applications
from using it. User applications should use the expat version from the
ports/package collection.
mav [Fri, 25 Dec 2009 08:06:35 +0000 (08:06 +0000)]
MFC r200668:
Remove duplicate devstat_start_transaction_bio() call. It is already called
from geom_disk. Dulicate call causes wrong queue depth and busy accounting.