sbruno [Fri, 4 Nov 2011 15:57:38 +0000 (15:57 +0000)]
MFC r224536:
Confirmed behavior of a Cisco 6509 in production.
In the old TFTP server, there was an undocumented behavior where
the block counter would rollover to 0 if a file larger
than 65535 blocks was transferred. With the default block size
of 512 octets per block, this is a file size of approximately 32 megabytes.
The new TFTP server code would report an error and stop transferring
the file if a file was larger than 65535 blocks.
This patch restores the old TFTP server's behavior to the new
TFTP server code. If a TFTP client transfers a file larger
than 65535 blocks, and does *not* specify the "rollover" option,
then automatically rollover the block counter to 0 every time
we reach 65535 blocks.
This restores interoperability with the FreeBSD 6 TFTP client.
Without this change, if a FreeBSD 6 TFTP client tried to
retrieve a file larger than 65535 blocks from a FreeBSD 9 TFTP server,
the transfer would fail. The same file could be retrieved successfully
if the same FreeBSD 6 TFTP client was used against a FreeBSD 6 TFTP server.
qingli [Tue, 1 Nov 2011 19:29:03 +0000 (19:29 +0000)]
MFC 226710
The host-id/interface-id can have a specific value and is properly
masked out when adding a prefix route through the "route" command.
However, when deleting the route, simply changing the command keyword
from "add" to "delete" does not work. The failoure is observed in
both IPv4 and IPv6 route insertion. The patch makes the route command
behavior consistent between the "add" and the "delete" operation.
kib [Tue, 1 Nov 2011 15:56:15 +0000 (15:56 +0000)]
MFC r226688:
The use of VOP_ISLOCKED() without a check for the return values can cause
false positives. Replace the #ifdef block with the proper
ASSERT_VOP_UNLOCKED() assert.
kib [Tue, 1 Nov 2011 15:53:44 +0000 (15:53 +0000)]
MFC r226687:
The only possible error return from null_nodeget() is due to insmntque1
failure (the getnewvnode cannot return an error). In this case, the
null_insmntque_dtr() already unlocked the reclaimed vnode, so VOP_UNLOCK()
in the nullfs_mount() after null_nodeget() failure is wrong.
kib [Tue, 1 Nov 2011 15:51:09 +0000 (15:51 +0000)]
MFC r226686:
The covered vnode must be reloced if it was unlocked. Remove VOP_ISLOCKED
test because of this and also because it can lead to false positives.
mm [Sun, 30 Oct 2011 21:02:01 +0000 (21:02 +0000)]
MFC r226724, r226732:
MFC r226724:
Update copyright information in several ZFS files, as the clause 3.3
of the CDDL licence explicitly requires every Contributor to add
a copyright notice.
This also reflects the copyright notices for the changes recently
added by Illumos.
MFC r226732: [1]
Fix typo in copyright notice introduced in r226724
(missing character in e-mail adress)
rmacklem [Sun, 30 Oct 2011 02:36:49 +0000 (02:36 +0000)]
MFC: r225537
Modify vfs_register() to use a hash calculation
on vfc_name to set vfc_typenum, so that vfc_typenum doesn't
change when file systems are loaded in different orders. This
keeps NFS file handles from changing, for file systems that
use vfc_typenum in their fsid. This change is controlled via
a loader.conf variable called vfs.typenumhash, since vfc_typenum
will change once when this is enabled. It defaults to 1 for
9.0, but will default to 0 when MFC'd to stable/8.
marius [Sun, 30 Oct 2011 01:24:53 +0000 (01:24 +0000)]
MFC: r199560
- Hook into the existing stat timer to drive the transmit watchdog instead
of using if_watchdog and if_timer.
- Reorder detach to call ether_ifdetach() before anything else in tl(4)
and wb(4).
marius [Sun, 30 Oct 2011 01:13:47 +0000 (01:13 +0000)]
MFC: r199559
- Add a private timer to drive the transmit watchdog instead of using
if_watchdog and if_timer.
- Fix some issues in detach for sn(4), ste(4), and ti(4). Primarily this
means calling ether_ifdetach() before anything else.
qingli [Fri, 28 Oct 2011 04:04:21 +0000 (04:04 +0000)]
MFC 226451
The IPv6 code was influx at the time of r196865 due to the L2/L3
separation rewrite changes. r196865 was committed to fix a scope
violation problem in the following test scenario:
qingli [Fri, 28 Oct 2011 03:58:33 +0000 (03:58 +0000)]
MFC 226713
Exclude host routes when checking for prefix coverage on multiple
interfaces. A host route has a NULL mask so check for that condition.
I have also been told by developers who customize the packet output
path with direct manipulation of the route entry (or the outgoing
interface to be specific). This patch checks for the route mask
explicitly to make sure custom code will not panic.
edwin [Tue, 25 Oct 2011 21:58:29 +0000 (21:58 +0000)]
MFC of 226752, tzdata2011m
Europe:
- Pridnestrovian Moldavian Republic (PMR, also known as
"Pridnestrovie") has abolished seasonal clock change (no transition
to the Winter Time).
- The recent change to the Ukranian time zone (Europe/Kiev) to
introduce permanent daylight saving time (similar to Russia) was
reverted.
South America:
- Bahia: The President signed a decree that includes Bahia in summer
time.
adrian [Sat, 22 Oct 2011 01:29:35 +0000 (01:29 +0000)]
Merge r226465 (below message) and r226467 (subsequent compile fixes).
Fix an issue with 11g beacon frames which looks to be a limitation
on the largest multi-write size.
From the submitter:
==
I looked further into the magic 88-byte threshold after which the bug
occurs. It turns out that figure included the 24-byte tx_desc, and up
to 64 bytes of beacon frame (header+data).
rum_write_multi doesn't seem happy with writing >64 bytes at a time to
the MAC register. If I break it up into separate calls (e.g. bytes
0-63, then bytes 64-65, written at the appropriate offset) I see the
proper beacon frames being transmitted now.
==
Submitted by: Steven Chamberlain <steven@pyro.eu.org>
trociny [Fri, 21 Oct 2011 05:40:30 +0000 (05:40 +0000)]
MFC r226403:
In r225809 the intention was to send VEOF only once if STDIN was not a
terminal. Unfortunately the fix was incorrect and for flushtime > 0 it
keept sending VEOF.
Sent VEOF generates ^D\b\b echoed by the terminal, which was reported
in bin/161526. Note, we still send VEOF at least once. Otherwise
commands like below would hang forever:
echo 1 |script /tmp/script.out cat
PR: bin/161526
Reported by: Adrian Wontroba <aw1@stade.co.uk>, Stefan Bethke <stb@lassitu.de>
Tested by: Stefan Bethke <stb@lassitu.de>
delphij [Thu, 20 Oct 2011 21:48:09 +0000 (21:48 +0000)]
MFC r226483:
Fix a bug in sa_find_sizes() which could lead to panic:
When calculating space needed for SA_BONUS buffers,
hdrsize is always rounded up to next 8-aligned boundary.
However, in two places the round up was done against
sum of 'total' plus hdrsize. On the other hand,
hdrsize increments by 4 each time, which means in
certain conditions, we would end up returning with
will_spill == 0 and (total + hdrsize) larger than
full_space, leading to a failed assertion because
it's invalid for dmu_set_bonus.
qingli [Tue, 18 Oct 2011 01:56:43 +0000 (01:56 +0000)]
MFC 226453
The code change made in r226040 was incomplete and resulted in
routes such as fe80::1%lo0 no being installed. This patch completes
the original intended fix.
qingli [Thu, 13 Oct 2011 00:37:39 +0000 (00:37 +0000)]
MFC 226224
All indirect routes will fail the rtcheck, except for a special host
route where the destination IP and the gateway IP is the same. This
special case handling is only meant for backward compatibility reason.
The last commit introduced a bug in the route check logic, where a
valid special case is treated as an error. This patch fixes that bug
along with some code cleanup.
gavin [Wed, 12 Oct 2011 21:38:48 +0000 (21:38 +0000)]
Merge r223566 from head:
The SMCWUSBG is a zyd(4) device, not an uath(4) device. Remove from
the latter.
It appears that the addition to uath(4) came in through PR kern/135009,
which had tested another device, the SMCWUSBTG2, successfully with
uath(4) and included the SMCWUSBG as it "has the same chipset". I can
find no other evidence that these two do actually share the same chipset.
Moreover, Linux treats the SMCWUSBG as a zyd(4) device also.
This is a partial merge, as it appears that the kernel parts of r223566
were already merged in r223605.
edwin [Wed, 12 Oct 2011 09:16:45 +0000 (09:16 +0000)]
MFC of tzdata2011l, 226289
Changes in 2011i:
Africa
- Added South Sudan: Africa/Juba
Australasia:
- Samoa will go forward 24 hours at 30 December 2011 to better match
the day of the week with its neighbours.
Europe:
- Europe/Kaliningrad will have the timezone KALT.
North America:
- Updates to Metlakatla historical data
- Newfoundland, Labrador and Resolute will do something which I
can't figure out.
iso3166tab;
- Add SS for South Sudan.
Changes in 2011j:
- Samoa will go from 29 December 23:59:59 to 31 December 00:00:00.
- Samoa DST will end on 1 April 2012
Changes in 2011k:
- Gaza / West Bank goes back to standard time on 02 August 2011.
- West Bank went bac kto DST on 30 August 2011.
- Lots of changes in Minsk (GMT+3 without DST) and other Russian
regions. A new timezone has been created for them, FET: Further-eastern
European Time aka GMT+3.
- Add Asian/Hebron to the zone.tab file.
Changes in 2011l:
- West Bank came out of DST on 30 September 2011.
- Fiji will g oin DST on 23 October and out of it on 26 Februari
- State Bahia might go back to DST in 16 October 2011
Due to legal problems, ado and Paul Eggert have to temporary suspend
their work on the timezone database
(http://thread.gmane.org/gmane.comp.time.tz/4133). Their work has
been continued by volunteers on the tz community and the hosting
of the data files is done by Robert Elz at ftp://munnari.oz.au/pub/.
kib [Tue, 11 Oct 2011 13:54:20 +0000 (13:54 +0000)]
MFC r225791:
Do not deliver SIGTRAP on exec as the normal signal, use ptracestop() on
syscall exit path. Otherwise, if SIGTRAP is ignored, that tdsendsignal()
do not want to deliver the signal, and debugger never get a notification
of exec.
qingli [Mon, 10 Oct 2011 21:54:19 +0000 (21:54 +0000)]
MFC 225163
When the RADIX_MPATH kernel option is enabled, the RADIX_MPATH code tries
to find the first route node of an ECMP chain before executing the route
command. If the system has a default route, and the specific route argument
to the command does not exist in the routing table, then the default route
would be reached. The current code does not verify the reached node matches
the given route argument, therefore erroneous removed the entry. This patch
fixes that bug.
qingli [Mon, 10 Oct 2011 21:48:40 +0000 (21:48 +0000)]
MFC 226040
The IFA_RTSELF instead of the IFA_ROUTE flag should be checked to
determine if a loopback route should be installed for an interface
IPv6 address. Another condition is the address must not belong to a
looopback interface.
qingli [Mon, 10 Oct 2011 21:46:37 +0000 (21:46 +0000)]
MFC 225223
When an interface address route is removed from the system, another
route with the same prefix is searched for as a replacement. The
current code did not bypass routes that have non-operational
interfaces. This patch fixes that bug and will find a replacement
route with an active interface.
PR: kern/159603
Submitted by: pluknet, ambrisko at ambrisko dot com
Reviewed by: discussed on net@
qingli [Mon, 10 Oct 2011 21:43:53 +0000 (21:43 +0000)]
MFC 226120
Do not try removing an ARP entry associated with a given interface
address if that interface does not support ARP. Otherwise the
system will generate error messages unnecessarily due to the missing
entry.
qingli [Mon, 10 Oct 2011 21:41:34 +0000 (21:41 +0000)]
MFC 226114
Remove the reference held on the loopback route when the interface
address is being deleted. Only the last reference holder deletes the
loopback route. All other delete operations just clear the IFA_RTSELF
flag.
PR: kern/159601
Submitted by: pluknet
Reviewed by: discussed on net@
qingli [Mon, 10 Oct 2011 21:38:19 +0000 (21:38 +0000)]
MFC 222438
Supply the LLE_STATIC flag bit to in_ifscurb() when scrubbing interface
address so that proper clean up will take place in the routing code.
This patch fixes the bootp panic on startup problem. Also, added more
error handling and logging code in function in_scrubprefix().
qingli [Mon, 10 Oct 2011 21:34:55 +0000 (21:34 +0000)]
MFC 222143
The statically configured (permanent) ARP entries are removed when an
interface is brought down, even though the interface address is still
valid. This patch maintains the permanent ARP entries as long as the
interface address (having the same prefix as that of the ARP entries)
is valid.
qingli [Mon, 10 Oct 2011 20:54:20 +0000 (20:54 +0000)]
MFC 225947
A system may have multiple physical interfaces, all of which are on the
same prefix. Since a single route entry is installed for the prefix
(without RADIX_MPATH), incoming packets on the interfaces that are not
associated with the prefix route may trigger an error message about
unable to allocation LLE entry, and fails L2. This patch makes sure a
valid route is present in the system, and allow the aforementioned
condition to exist and treats as valid.
rmacklem [Mon, 10 Oct 2011 14:35:26 +0000 (14:35 +0000)]
MFC: r226081, r226104
A crash reported on freebsd-fs@ on Sep. 23, 2011 under the subject
heading "kernel panics with RPCSEC_GSS" appears to be caused by a
corrupted tailq list for the client structure. Looking at the code, calls
to the function svc_rpc_gss_forget_client() were done in an SMP unsafe
manner, with the svc_rpc_gss_lock only being acquired in the function
and not before it. As such, when multiple threads called
svc_rpc_gss_forget_client() concurrently, it could try and remove the
same client structure from the tailq lists multiple times.
The patch fixes this by moving the critical code into a separate
function called svc_rpc_gss_forget_client_locked(), which must be
called with the lock held. For the one case where the caller would
have no interest in the lock, svc_rpc_gss_forget_client() was retained,
but a loop was added to check that the client structure is still in
the tailq lists before removing it, to make it safe for multiple
concurrent calls.
Also, remove an extraneous "already" from a comment introduced by r226081.
kib [Mon, 10 Oct 2011 13:03:14 +0000 (13:03 +0000)]
MFC r225894:
The sigwait(3) function shall not return EINTR, according to the
POSIX/SUSvN. The sigwait(2) syscall does return EINTR, and libc.so.7
contains the wrapper sigwait(3) which hides EINTR from callers. The
EINTR return is used by libthr to handle required cancellation point
in the sigwait(3).
To help the binaries linked against pre-libc.so.7, i.e. RELENG_6 and
earlier, to have right ABI for sigwait(3), transform EINTR return from
sigwait(2) into ERESTART.
gjb [Mon, 10 Oct 2011 11:11:59 +0000 (11:11 +0000)]
MFC 225908, 225912, 225927:
225908:
- Reorder default ps(1) output according to reality.
225912:
- there's no reason the semantics of the -x flag are being explained in
the -a flag description
- be more precise regarding the relation between the -a flag and the
security.bsd.see_other_uids sysctl
- describe the format of the -t flag's argument
- 'con' no longer is a possible entry in the 'TT' column
- explain that the 'TT' column refers to pseudo-terminals
via mere numbers
- add a hint in the 'tt' keyword description that a
keyword 'tty' exists, which will give the full terminal pathname
225859:
- Correct a typo that was introduced in 225912
MFC r225828:
Remove assertion that prevents zfs rename of datasets with mountpoint=none
or mountpoint=legacy that have children datasets. This also fixes dataset
rename when receiving incremental snapshots as reported on freebsd-fs@
This assertion was made triggerable by opensolaris change #10196.
Fix an obvious bug from r186196 shadowing a variable, not correctly
appending the new mbuf to the chain reference but possibly causing an mbuf
nextpkt loop leading to a memory used after handoff (or having been freed)
and leaking an mbuf here.
Pass the fibnum where we need filtering of the message on the
rtsock allowing routing daemons to filter routing updates on an
rtsock per FIB.
Adjust raw_input() and split it into wrapper and a new function
taking an optional callback argument even though we only have one
consumer [1] to keep the hackish flags local to rtsock.c.