| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
- Use strlcat() instead of strncat().
- Use asprintf() and handle allocation errors.
|
|
|
|
| |
Fix style and wrap lines to 80 columns in savecore.c.
|
|
|
|
| |
This is a direct commit to stable/11.
|
|
|
|
| |
Add a subroutine for comparing kerneldump identifiers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFC r316938,r316953:
r316938:
savecore: fix space calculation with respect to `minfree` in check_space(..)
- Use strtoll(3) instead of atoi(3), because atoi(3) limits the
representable data to INT_MAX. Check the values received from
strtoll(3), trimming trailing whitespace off the end to maintain
POLA.
- Use `KiB` instead of `kB` when describing free space, total space,
etc. I am now fully aware of `KiB` being the IEC standard for 1024
bytes and `kB` being the IEC standard for 1000 bytes.
- Store available number of KiB in `available` so it can be more
easily queried and compared to ensure that there are enough KiB to
store the dump image on disk.
- Print out the reserved space on disk, per `minfree`, so end-users
can troubleshoot why check_space(..) is reporting that there isn't
enough free space.
Tested with: positive/negative cases (see review); make tinderbox
r316953:
Switch back to non-IEC units for 1024 bytes
I was swayed a little too quickly when I saw the wiki page discussing
kB vs KiB. Switch back as none of the code in base openly uses
IEC units via humanize_number(3) (which was my next step), and there's
a large degree of dislike with IEC vs more SI-like units.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r320165:
devd(8): Remove pidfile on shutdown
Sponsored by: Spectra Logic Corp
r320166:
Require devd to be running for its ATF tests to run
The ATF tests communicate with the system's running devd
PR: 220169
Reported by: gjb
Sponsored by: Spectra Logic Corp
r320167:
zfsd(8): Remove pidfile on shutdown
Sponsored by: Spectra Logic Corp
|
|
|
|
|
|
|
|
|
| |
sbin/ipfw: strcpy, strncpy => strlcpy
Reported by: Coverity
CID: 1356162, 1356166
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D10662
|
|
|
|
|
|
|
|
| |
Fix integer overflow in "camcontrol format"
Reported by: Coverity
CID: 1011426
Sponsored by: Spectra Logic Corp
|
|
|
|
|
|
|
|
|
| |
Allow '_' in labels when specifying -L to newfs.
PR: 220163
Reported by: Keve Nagy
Reviewed by: kib
Approved by: re@ (Xin Li)
|
|
|
|
|
|
| |
Clarify units for mediasize and sectorsize in DoFile(..)
They're byte quantities.
|
|
|
|
|
|
|
|
| |
Clarify `minfree` warning message in check_space(..)
- State that the units are kB.
- Be more complete/concise in terms of what is required (in this case
`minfree` must be at least `X`kB)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r313695:
MFV r313676: libpcap 1.8.1
r313760:
MFV r313759: license change for a few headers (4 clause BSD to 3 clause BSD).
X-MFC-with: r313695
r314769:
Remove compatibility with old libpcap.
Differential Revision: https://reviews.freebsd.org/D9606
r314863:
Stop installing pcap-int.h, which is the internal interface for libpcap.
Reference: https://github.com/the-tcpdump-group/libpcap/issues/560
PR: 217221
r314865:
Bump __FreeBSD_version for removal of pcap-int.h.
PR: 217221
r316125:
MFV r316124: Fix build when WITHOUT_INET6.
Reported by: Randy Westlund <rwestlun gmail com>
|
|
|
|
|
|
| |
bin: normalize paths using SRCTOP-relative paths or :H when possible
This simplifies make logic/output
|
|
|
|
|
|
| |
Update the "first appeared in" version in several manual pages.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
| |
Fix memory leaks in camcontrol
Reported by: Coverity
CID: 1331674, 1331675
Reviewed by: ken
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D10588
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r317755:
Various Coverity fixes in ifconfig(8)
* Exit early if kldload(2) fails (1011259). This is the only change that
affects ifconfig's behavior.
* Close memory and resource leaks (1305624, 1305205, 1007100)
* Mark usage() as _Noreturn (1305806, 1305750)
* Fix some dereference after null checks (1011474, 270774)
Reported by: Coverity
CID: 1305624, 1305205, 1007100, 1305806, 1305750, 1011474,
CID: 270774, 1011259
Reviewed by: cem
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D10587
r317758:
Unbreak ifconfig for mlx4en(4) after r317755
ifconfig doesn't correctly infer mlx interfaces' module names, so it will
attempt to load the mlx(4) module even when not necessary.
Reported by: rstone
X-MFC-With: 317755
Sponsored by: Spectra Logic Corp
|
|
|
|
|
|
|
|
| |
ifconfig displays ND6_IFF_NO_DAD as "IGNORELOOP"
PR: 218958
Reviewed by: kristof
Differential Revision: https://reviews.freebsd.org/D10543
|
|
|
|
|
|
| |
Allow zero port specification in table entries with type flow.
PR: 217620
|
|
|
|
|
|
|
|
|
|
| |
Add `gmirror create` subcommand, alike to gstripe, gconcat, etc.
It is quite specific mode of operation without storing on-disk metadata.
It can be useful in some cases in combination with some external control
tools handling mirror creation and disks hot-plug.
Sponsored by: iXsystems, Inc.
|
|
|
|
|
|
|
|
| |
Fix mount_nfs so that it doesn't create mounttab entries for NFSv4 mounts.
The NFSv4 protocol doesn't use the Mount protocol, so it doesn't make sense
to add an entry for an NFSv4 mount to /var/db/mounttab. Also, r308871
modified umount so that it doesn't remove any entry created by mount_nfs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
------------------------------------------------------------------------
r317923 | n_hibma | 2017-05-07 23:11:28 +0200 (Sun, 07 May 2017) | 8 lines
Fix the output of very large rebind, renew and lease time options in
lease file.
Some routers set very large values for rebind time (Netgear) and these
are erroneously reported as negative in the leasefile. This was due to a
wrong printf format specification of %ld for an unsigned long on 32-bit
platforms.
------------------------------------------------------------------------
r317915 | n_hibma | 2017-05-07 21:59:37 +0200 (Sun, 07 May 2017) | 16 lines
Fix handling of large DHCP expiry values.
They would overflow a signed 32-bit time_t on 32 bit architectures. This
was taken care of, but a compiler optimisation makes this behave
erratically. This could be resolved by adding a -fwrapv flag, but
instead we can check the value before adding the current timestamp to
it.
In the lease file values are still wrong though:
option dhcp-rebinding-time -644245096;
PR: 218980
|
|
|
|
|
|
|
|
|
| |
Add a post-humous manpage for cd9660(5), the ISO-9660 file system
Describe (briefly) how to compile the filesystem into the kernel and
load as a module.
Reference cd9660(5) in mount(8) and mount_cd9660(8).
|
|
|
|
| |
Advertise kldxref(8) a little better.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a way to retrive it
The MAC address reported by `ifconfig ${nic} ether' does not always match
the address in the hardware, as reported by the driver during attach. In
particular, NICs which are components of a lagg(4) interface all report the
same MAC.
When attaching, the NIC driver passes the MAC address it read from the
hardware as an argument to ether_ifattach(). Keep a second copy of it, and
create ioctl(SIOCGHWADDR) to return it. Teach `ifconfig' to report it along
with the active MAC address.
PR: 194386
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r315112:
Add the capability to refresh the gpart(8) label without need a reboot.
gpart(8) has functionality to change the label of an GPT partition.
This functionality works like it should, however, after a label change
the /dev/gpt/ entries remain unchanged. glabel(8) status output remains
unchanged. The change only takes effect after a reboot.
PR: 162690
Submitted by: sub.mesa@gmail, Ben RUBSON <ben.rubson@gmail.com>, ae
Reviewed by: allanjude, bapt, bcr
Differential Revision: https://reviews.freebsd.org/D9935
r315196:
After r315112 I broke the tests with eli, instead to pass 0, I should pass
M_NOWAIT to g_media_changed() that will call g_post_event() with this flag.
Reported by: lwhsu, ngie and ae
|
|
|
|
|
|
| |
In fill_ip6(), the value of the pointer av changes before it is
free(3)ed. Thus, introduce a new variable to track the original
value.
|
| |
|
|
|
|
|
|
| |
Add sets support for ipfw table info/list/flush commands.
PR: 212668
|
|
|
|
|
|
|
| |
In parse_range() validate both range values instead of checking
the top value twice.
PR: 202295
|
|
|
|
|
|
|
|
| |
Properly initialize ipfw_range_tlv variable to fix possible EINVAL
in case when ipfw delete/zero/resetlog command issued for several rules
in the loop. Also reorder some variables by size.
PR: 218993
|
|
|
|
|
|
| |
Add `ipfw table all destroy` support.
PR: 212669
|
|
|
|
|
|
| |
This is a direct commit since MFCing these changes is impractical.
Sponsored by: Dell EMC Isilon
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When editing a mode page on a tape drive, do not clear the device
specific parameter.
Tape drives include write protect (WP), Buffered Mode and Speed
settings in the device-specific parameter. Clearing this
parameter on a mode select can have the effect of turning off
write protect or buffered mode, or changing the speed setting of
the tape drive.
Disks report DPO/FUA support via the device specific parameter
for MODE SENSE, but the bit is reserved for MODE SELECT. So we
clear this for disks (and other non-tape devices) to avoid
potential errors from the target device.
sbin/camcontrol/modeedit.c:
Clear the device-specific parameter in the mode page
header if we're not operating on a tape drive.
Sponsored by: Spectra Logic
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r317774:
Add the ability to rescan or reset devices specified by peripheral
name and unit number in camcontrol(8).
Previously camcontrol(8) only supported rescanning or resetting
devices specified by bus:target:lun. This is because for
rescanning at least, you don't have a peripheral name and unit
number (e.g. da4) for devices that don't exist yet.
That is still the case after this change, but in other cases, when
the device does exist in the CAM EDT (Existing Device Table), we
do a careful lookup of the bus/target/lun if the user supplies a
peripheral name and unit number to find the bus:target:lun and then
issue the requested reset or rescan.
The lookup is done without actually opening the device in question,
since a rescan is often done to make a device go away after it has
been pulled. (This is especially true for busses/controllers, like
parallel SCSI controllers, that don't automatically detect changes
in topology.) Opening a device that is no longer there to
determine the bus/target/lun might result in error recovery actions
when the user really just wanted to make the device go away.
sbin/camcontrol/camcontrol.c:
In dorescan_or_reset(), if the use hasn't specified a
numeric argument, assume he has specified a device. Lookup
the pass(4) instance for that device using the transport
layer CAMGETPASSTHRU ioctl. If that is successful, we can
use the returned bus:target:lun to rescan or reset the
device.
Under the hood, resetting a device using XPT_RESET_DEV is
actually sent via the pass(4) device anyway. But this
provides a way for the user to specify devices in a more
convenient way, and can work on device rescans when the
device is going away, assuming it still exists in the EDT.
sbin/camcontrol/camcontrol.8:
Update the man page for the rescan and reset subcommands
to reflect that you can now use a device name and unit
number with them.
Sponsored by: Spectra Logic
r317776:
Bump the camcontrol(8) man page date.
Sponsored by: Spectra Logic
|
|
|
|
|
|
|
|
|
|
|
| |
fsck_ffs: Unsign some variables and make use of reallocarray(3).
Instead of casting listmax and numdirs to unsigned values just define
them as unsigned and avoid the casts. Use reallocarray(3).
While here, fs_ncg is already unsigned so the cast is unnecessary.
Reviewed by: mckusick
|
|
|
|
|
|
|
|
|
|
| |
Before this change it was impossible to set number of PKCS#5v2 iterations,
required to set passphrase, if it has two keys and never had any passphrase.
Due to present metadata format limitations there are still cases when number
of iterations can not be changed, but now it works in cases when it can.
PR: 218512
Sponsored by: iXsystems, Inc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix camcontrol timestamp setting and update the man page.
camcontrol timestamp -s would somtimes fail due to stack garbage. Zero out
the timestamp parameters to fix it.
Fix another nearby bug, and update the man page.
sbin/camcontrol/timestamp.c:
In set_timestamp(), bzero ts_p prior to creating the timestamp.
Previously stack garbage could cause some tape drives to reject the
timestamp.
In set_timestamp(), check for failures from strptime().
sbin/camcontrol/camcontrol.8:
Add the time argument to the -T option to camcontrol timestamp -s
in the long description.
Change the time/date format used in the camcontrol timestamp
example to RFC 2822 format. This fixes a time zone issue with the
original example by specifying the time zone as -0600. Otherwise,
the time zone seems to default to standard time in the current
locale, which makes the time, when reported back from the drive,
1 hour off from the intended setting. This also fixes a duplicate
day of the week ("Wednesday Wed") in the previous example.
Submitted by: Sam Klopsch
Sponsored by: Spectra Logic
|
|
|
|
|
|
|
|
| |
sbin/mount: strcpy -> strlcpy
Reported by: Coverity
CID: 1011173, 1011174
Sponsored by: Spectra Logic Corp
|
|
|
|
|
|
| |
Document the "oneopenown" option added by r316792.
This is a content change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add large replay widow support to setkey(8) and libipsec.
When the replay window size is large than UINT8_MAX, add to the request
the SADB_X_EXT_SA_REPLAY extension header that was added in r309144.
Also add support of SADB_X_EXT_NAT_T_TYPE, SADB_X_EXT_NAT_T_SPORT,
SADB_X_EXT_NAT_T_DPORT, SADB_X_EXT_NAT_T_OAI, SADB_X_EXT_NAT_T_OAR,
SADB_X_EXT_SA_REPLAY, SADB_X_EXT_NEW_ADDRESS_SRC, SADB_X_EXT_NEW_ADDRESS_DST
extension headers to the key_debug that is used by `setkey -x`.
Modify kdebug_sockaddr() to use inet_ntop() for IP addresses formatting.
And modify kdebug_sadb_x_policy() to show policy scope and priority.
Reviewed by: gnn, Emeric Poupon
Differential Revision: https://reviews.freebsd.org/D10375
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r316530:
Fix clearing geom metadata if DIOCGSECTORSIZE fails
An unhandled error case would result in passing SIZE_MAX to malloc.
While I'm here, remove an unnecessary NULL check before free
Reported by: Coverity
CID: 1017793
Sponsored by: Spectra Logic Corp
r316535:
Fix memory leak in "gpart bootcode"
Also, annotate that gpart_issue never returns
Reported by: Coverity
CID: 1007105
Sponsored by: Spectra Logic Corp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Misc Coverity fixes in camcontrol(8)
CID 1229913 Fix output of "camcontrol persist -i report_capabilities".
The reported Persistent Reservation Types were wrong in all
cases.
CID 1356029 Annotate the code so Coverity will know that this is a false
positive.
CID 1366830 Fix a memory leak in "camcontrol timestamp -s"
CID 1366832 Fix a segfault that could be caused by bad drive firmware
Also, fix the man page entry for the "camcontrol epc state" command to match
what the code does.
Reviewed by: ken, wblock
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9239
|
|
|
|
|
|
|
|
|
| |
Make setkey(8) more clear about anti-replay window size option semantics.
PR: 172913
Submitted by: john@saltant.com
Reviewed by: ae@
Differential Revision: https://reviews.freebsd.org/D10304
|
|
|
|
|
|
| |
Document how to use reroot with NFS.
Sponsored by: DARPA, AFRL
|
|
|
|
|
|
| |
In fsck_ffs pass1, prevent the inosused variable from wrapping.
PR: 218592
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add ipfw_pmod kernel module.
The module is designed for modification of a packets of any protocols.
For now it implements only TCP MSS modification. It adds the external
action handler for "tcp-setmss" action.
A rule with tcp-setmss action does additional check for protocol and
TCP flags. If SYN flag is present, it parses TCP options and modifies
MSS option if its value is greater than configured value in the rule.
Then it adjustes TCP checksum if needed. After handling the search
continues with the next rule.
Obtained from: Yandex LLC
Relnotes: yes
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D10150
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add O_EXTERNAL_DATA opcode support.
This opcode can be used to attach some data to external action opcode.
And unlike to O_EXTERNAL_INSTANCE opcode, this opcode does not require
creating of named instance to pass configuration arguments to external
action handler. The data is coming just next to O_EXTERNAL_ACTION opcode.
The userlevel part currenly supports formatting for opcode with ipfw_insn
size, by default it expects u16 numeric value in the arg1.
Obtained from: Yandex LLC
Sponsored by: Yandex LLC
|
|
|
|
|
|
|
| |
newfs_nandfs: Fix unaligned pointer warning
PR: 217532
Submitted by: Trond Endrestol <Trond.Endrestol at ximalas.info>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we are doing SA lookup for TCP-MD5, check both source and
destination addresses. Previous code has used only destination address
for lookup. But for inbound packets the source address was used as SA
destination address. Thus only outbound SA were used for both directions.
Now we use addresses from a packet as is, thus SAs for both directions are
needed.
Reported by: Mike Tancsa
MFC r316507,316508:
In the example section show that TCP-MD5 connection needs SA for both
directions.
Use unique SPI.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow superseding the lease renewal and rebind times.
Also make sure that the renewal is never more than 1/2 * expiry and
rebind never more than 7/4 * renewal (the default values in the spec).
This should allow adjusting high values from the server as well as
making sure the values from the server make sense.
Renewal and rebind times will be adjusted down if the expiry time is set
very high in a server, not the other way around. This change just makes
sure the values keep making sense.
and 316285:
Make dhcp-lease-time option supersedable as well.
Note: It is not recommended to set this value to above the value that
the server provided, unless that value is bogus.
|