Fix IP_SENDSRCADDR semantics.
* To use this option with a UDP socket, it must be bound to a local port,
and INADDR_ANY, to disallow possible collisions with existing udp inpcbs
bound to the same port on other interfaces at send time.
* If the socket is bound to INADDR_ANY, specifying IP_SENDSRCADDR with
INADDR_ANY will be rejected as it is ambiguous.
* If the socket is bound to an address other than INADDR_ANY, specifying
IP_SENDSRCADDR with INADDR_ANY will be disallowed by in_pcbbind_setup().
Reviewed by: silence on -net
Tested with: src/tools/regression/netinet/ipbroadcast
Comply with RFC 3927, by forcing ARP replies which contain a source
address within the link-local IPv4 prefix 169.254.0.0/16, to be
broadcast at link layer.
Reviewed by: fenner
Fix long standing multi playback/recording issues, caused by
excessive interrupt clock timer reset, screwing interrupt generation
for already active channels. Track moving DMA pointer and call buffer
interrupt on each blocksize boundary.
PR: kern/109791
rev. 1.201 src/sys/kern/kern_prot.c
rev. 1.334 src/sys/kern/vfs_export.c
rev. 1.95 src/sys/nfsserver/nfs_srvsock.c
rev. 1.137 src/sys/nfsserver/nfs_srvsubs.c
rev. 1.53 src/sys/sys/ucred.h
rev. 1.273 src/sys/ufs/ufs/ufs_vnops.c
Use the refcount API to manage the reference count for user credentials
rather than using pool mutexes.
MFC changes:
The cr_mtxp field of struct ucred is preserved as padding to keep structure
size intact. nfs_srvsock.c change is nullified by rev. 1.96, that was MFCed
as rev. 1.94.2.2.
OKed by: jhb
LOR: 187
- Flesh out list of UART simple comms programming interfaces.
- Add list of PIC base peripheral programming interfaces.
- Add VPD capability register offsets.
Fix undirected broadcast sends for the case where SO_DONTROUTE has also
been set at the socket layer, in our somewhat convoluted IPv4 source
selection logic in ip_output().
IP_ONESBCAST is actually a special case of SO_DONTROUTE, as 255.255.255.255
must always be delivered on a local link with a TTL of 1.
If IP_ONESBCAST has been set at the socket layer, also perform destination
interface lookup for point-to-point interfaces based on the destination
address of the link; previously it was not possible to use the option with
such interfaces; also, the destination/broadcast address fields map to the
same field within struct ifnet, which doesn't help matters.
Reviewed by: andre
Fix a bug in if_findmulti(), whereby it would not find (and thus delete)
a link-layer multicast group membership.
Such memberships are needed in order to support protocols such as
IS-IS without putting the interface into PROMISC or ALLMULTI modes.
sa_equal() is not OK for comparing sockaddr_dl as it has deeper structure
than a simple byte array, so add sa_dl_equal() and use that instead.
Reviewed by: rwatson
Verified with: /usr/sbin/mtest
Bug found by: Jouke Witteveen
MFC after: 2 weeks
Add a 3rd entry in the cache, which keeps the end position
from just before extending a file. This has the desired effect
of keeping the write speed constant. And yes, that helps a lot
copying large files always at full speed now, and I have seen
improvements using benchmarks/bonnie.
Stolen from: NetBSD
Reviewed by: bde
Fix the cdboot twiddle display.
I created and tested this with a custom FreeSBIE cd-image.
PR: i386/96452
Submitted by: Yuichiro Goto <y7goto at gmail dot com>
MFC after: 3 days
Approved by: imp (mentor)
Approved by: imp (mentor)
Do not dispatch SIGPIPE from the generic write path for a socket; with
this patch the code behaves according to the comment on the line above.
Without this patch, a socket could cause SIGPIPE to be delivered to its
process, once with SO_NOSIGPIPE set, and twice without.
With this patch, the kernel now passes the sigpipe regression test in
both HEAD and RELENG_6.
PR: 78478 (the bug fix for this PR introduced this bug)
Tested by: Anton Yuzhaninov
Reviewed by: jhb
In the output path, mask off M_BCAST|M_MCAST so as to prevent incorrect
addressing if a packet is later re-encapsulated and sent to a
non-broadcast, non-multicast destination after being received on the
ng_ksocket input hook.
These mbuf flags should not be set on the mbuf packet header chain until
the data thus sent re-enters ip_output() by way of the pru_sosend callback
anyway.
PR: 106999
Tested by: ume
Submitted by: Kevin Lahey
Implement ifnet cloning for tun(4)/tap(4).
Make devfs cloning a sysctl/tunable which defaults to on.
If devfs cloning is enabled, only the super-user may create
tun(4)/tap(4)/vmnet(4) instances. Devfs cloning is still enabled by
default; it may be disabled from the loader or via sysctl with
"net.link.tap.devfs_cloning" and "net.link.tun.devfs_cloning".
Disabling its use affects potentially all tun(4)/tap(4) consumers
including OpenSSH, OpenVPN and VMware.
Revision Changes Path
1.18 +32 -5 src/share/man/man4/tap.4
1.24 +33 -4 src/share/man/man4/tun.4
1.69 +126 -32 src/sys/net/if_tap.c
1.162 +77 -7 src/sys/net/if_tun.c
PR: 105228 (potentially also 90413, 105570)
Submitted by: Landon Fuller
Tested by: Andrej Tobola
Approved by: core (rwatson)
promisc mode hack while vlan hardware tag processing is enabled.
For all the details view the commitlog for the following files:
sys/net/ethernet.h revision 1.26
sys/net/if_ethersubr.c revision 1.220
sys/dev/em/if_em.c revision 1.165
Close a race that occurs when using sendto() to connect and send on a
UNIX domain socket at the same time as the remote host is closing the
new connections as quickly as they open. Since the connect() and
send() paths are non-atomic with respect to another, it is possible
for the second thread's close() call to disconnect the two sockets
as connect() returns, leading to the consumer (which plans to send())
with a NULL kernel pointer to its proposed peer. As a result, after
acquiring the UNIX domain socket subsystem lock, we need to revalidate
the connection pointers even though connect() has technically succeed,
and reurn an error to say that there's no connection on which to
perform the send.
We might want to rethink the specific errno number, perhaps ECONNRESET
would be better.
Reported by: Young Hyun <youngh at caida dot org>
PR: 100940
Rounding addr upwards to next 2M boundary in pmap_growkernel() could
cause addr to become 0, resulting in an early return without populating
the last PDE.
Remove union_dircheckp hook, it is not needed by new unionfs code anymore.
As consequence, getdirentries() no longer needs to drop/reacquire
directory vnode lock, that would allow it to be reclaimed in between.
Use int instead of u_int for the 'extra' argument to the
clone_create() KPI.
This fixes a signedness bug in unit number comparisons.
Revision Changes Path
1.201 +1 -1 src/sys/kern/kern_conf.c
1.67 +1 -1 src/sys/net/if_tap.c
1.231 +1 -1 src/sys/sys/conf.h
Submitted by: imp, Landon Fuller
PR: kern/105228
1.203 +6 -2 src/sys/cam/scsi/scsi_da.c
1.101 +1 -1 src/sys/geom/geom_disk.c
Reduce the noise when plugging in (USB) mass storage devices, like a 4 port
flash card reader.
Also remove an 'Opened da0 -> <random number>' which is not needed on a daily
basis (available through bootverbose).