102231 Commits

Author SHA1 Message Date
tuexen
09fd91eb46 MFC r282810:
Ensure that the COOKIE-ACK can be sent over UDP if the COOKIE-ECHO was
received over UDP.
Thanks to Felix Weinrank for makeing me aware of the problem and to
Irene Ruengeler for providing the fix.
2015-05-29 13:37:04 +00:00
tuexen
a2dbf980ab MFC r282042:
Don't panic under INVARIANTS when receiving a SACK which cumacks
a TSN never sent.
While there, fix two typos.
2015-05-29 13:34:31 +00:00
tuexen
65d8b9f172 MFC r280714:
Improve the selection of the destination address of SACK chunks.
This fixes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196755
and is joint work with rrs@.
2015-05-29 13:26:05 +00:00
tuexen
443fcce7c9 MFC r280642:
Make sure that we don't free an SCTP shared key too early.
Thanks to Pouyan Sepehrdad from Qualcomm Product Security Initiative
for reporting the issue.
2015-05-29 13:23:16 +00:00
tuexen
6fa1d035cb MFC r280634:
Use the reference count of the right SCTP inp.
Joint work with rrs@
2015-05-29 13:20:39 +00:00
tuexen
6e64233ed9 MFC r280459:
Fix two bugs which resulted in a screwed up end point list:
* Use a save way to walk throught a list while manipulting it.
* Have to appropiate locks in place.
Joint work with rrs@
2015-05-29 13:18:10 +00:00
tuexen
d8c5ad4ada MFC r280440:
Fix the bug in the handling of fragmented abandoned SCTP user messages reported in
https://code.google.com/p/sctp-refimpl/issues/detail?id=11
Thanks to Lally Singh for reporting it.
2015-05-29 13:13:12 +00:00
tuexen
ae995cba15 MFC r280439:
Fix an accounting bug related to the per stream chunk counter.
While there, don't refer to a net articifically.
2015-05-29 13:11:13 +00:00
tuexen
b42d72caa3 MFC r280404:
When an ICMP message is received and the MTU shrinks, only
mark outstanding chunks for retransmissions.
2015-05-29 13:08:43 +00:00
tuexen
d21c3896b9 MFC r280371:
Remove a useless assignment.
2015-05-29 13:06:15 +00:00
tuexen
a29e8c28ca MFC r279886:
Fix the adaptation of the path state when thresholds are changed
using the SCTP_PEER_ADDR_THLDS socket option.
2015-05-29 13:02:00 +00:00
tuexen
16fb87c63d MFC r279867:
Keep track on the socket lock state. This fixes a bug showing up on
Mac OS X.
2015-05-29 12:59:18 +00:00
tuexen
b21153d463 MFC r279863:
Unlock the stcb when using setsockopt() for the SCTP_PEER_ADDR_THLDS option.
2015-05-29 12:57:04 +00:00
tuexen
10635a0e4c MFC r279859:
Add a SCTP socket option to limit the cwnd for each path.
2015-05-29 12:54:30 +00:00
tuexen
44f9f670c9 MFC r279841:
Fix a typo.
2015-05-29 12:50:53 +00:00
tuexen
c929c897c8 MFC r277815:
Whitespace change.
2015-05-29 12:48:14 +00:00
tuexen
03ab9820fc MFC r277424:
Remove comparisons which are not necessary.
With manual intervention.

Reported by:	Coverity
CID:		1237826, 1237844, 1237847
2015-05-29 12:45:55 +00:00
tuexen
4ed8a22fc6 MFC r277380:
Code cleanup.

Reported by:	Coverity
CID:		749578
2015-05-29 12:35:21 +00:00
tuexen
186be7c17d MFC r277350:
Fix a bug which only shows up when an mbuf allocation failed.
Therefore chances are low that we hit this.

Reported by:	Coverity
CID:		1018886
2015-05-29 12:33:02 +00:00
tuexen
7fa1168111 MFC r277348:
Remove an unnecessary check.

Reported by:	Coverity
CID:		749576
2015-05-29 12:30:19 +00:00
tuexen
e920cd42ce MFC r277347:
Add protection code to free memory in case of processing an address which
is neither IPv4 or IPv6.

Reported by:	Coverity
CID:		749311
2015-05-29 12:27:45 +00:00
tuexen
e522160ca4 MFC r277337:
Remove an unused variable.

Reported by:	Coverity
CID:		750999
2015-05-29 12:25:11 +00:00
tuexen
d303d373d1 MFC r277053:
Remove dead code.

Reported by:	Coverity
CID:		748664
2015-05-29 12:22:35 +00:00
tuexen
059450c5d6 MFC r277049:
Remove dead code.

Reported by:	Coverity
CID:		1018052
2015-05-29 12:19:41 +00:00
tuexen
f1c488bb6d MFC r277046:
Remove dead code.

Reported by:	Coverity
CID:		1018053
2015-05-29 12:17:21 +00:00
tuexen
a3f1c54c9d MFC r277034:
Remove dead code.

Reported by:	Coverity
CID:		748663
2015-05-29 12:13:52 +00:00
tuexen
b7947552da MFC r277033:
Remove dead code.

Reported by:	Coverity
CID:		748660, 748661
2015-05-29 12:11:14 +00:00
tuexen
6e1abed81c MFC r277031
Remove dead code.

Reported by:	Coverity
CID:		748665
2015-05-29 12:08:49 +00:00
tuexen
da3006cf8b MFC r277030:
Remove dead code.

Reported by:	Coverity
CID:		748666
2015-05-29 12:06:00 +00:00
tuexen
369d8e1e68 MFC r276914:
Minimize the usage of SCTP_BUF_IS_EXTENDED.
This should help Robert...
2015-05-29 12:03:02 +00:00
tuexen
9b5b9e6473 MFC r276009:
Don't check twice that inp is not NULL.

Reported by:	Coverity
CID:		748671
2015-05-29 11:52:32 +00:00
tuexen
be4dc0520d MFC r275967:
Fix and harmonize the validation of PR-SCTP policies.

Reported by:	Coverity
CID:		1232044
2015-05-29 11:47:54 +00:00
tuexen
25101e7981 MFC r275954:
Cleanup the code.

Reported by:	Coverity
CID:		1232003
2015-05-29 11:43:51 +00:00
tuexen
0a467bef43 MFC r275869:
Add a missing break.

Reported by:	Coverity
CID:		1232014
2015-05-29 11:40:50 +00:00
tuexen
551a3dd3e4 MFC r275868:
Plug a memory leak in an error code path.

Reported by:	Coverity
CID:		1018936
2015-05-29 11:25:38 +00:00
tuexen
76a9701748 MFC r275574:
Include the received chunk padding when reporting an unknown chunk.
2015-05-29 11:18:06 +00:00
tuexen
4e7201cd30 MFC r275567:
Fix the support of mapped IPv4 addresses.
Thanks to Mark Bonnekessel and Markus Boese for making me aware of the
problems.
2015-05-29 11:15:00 +00:00
tuexen
3c88229c08 MFC r273925:
Don't zero the stats before they are read out.
2015-05-29 11:04:55 +00:00
tuexen
1076c79452 MFC r273634:
Fix a use of an uninitialized variable by makeing sure
that sctp_med_chunk_output() always initialized the reason_code
instead of relying on the caller.
The variable is only used for debugging purpose.
This issue was reported by Peter Bostroem from Google.
2015-05-29 11:01:46 +00:00
arybchik
197df5ee5d MFC: r283599
sfxge: mask ifmedia options (pauses) when looking for matching mode

Sponsored by:   Solarflare Communications, Inc.
2015-05-29 05:58:21 +00:00
markj
ec234b9b79 MFC r277915:
Don't attempt to disable enabled fasttrap probes in an exiting process.

MFC r277914:
fasttrap_sigtrap(): use tdsendsignal() to send SIGTRAP.
2015-05-29 04:22:57 +00:00
markj
9bbe24351d MFC r281915:
Make vpanic() externally visible.

MFC r281916:
Fix DTrace's panic() action.
2015-05-29 04:01:39 +00:00
markj
aff03409ef MFC r282331:
Don't drop the idr lock before verifying that the newly-inserted element
is present in the tree.

MFC r282741:
find_next_bit() and find_next_zero_bit(): if the caller-specified offset
lies within the last block of the bit set and no bits are set beyond the
offset, terminate the search immediately instead of continuing as though
there are further blocks in the set and subsequently returning an incorrect
result.

MFC r282743:
Ensure that msecs_to_jiffies(0) == 0.
2015-05-29 03:47:35 +00:00
erj
6e387585c4 Fix build issue and incompatibilites introduced by r283620.
- Re-introduce "device ixgbe" option for kernel configs. This allows
  users to continue using existing kernel configurations, while still
  letting if_ix and if_ixv exist to allow ifconfig magic to work.
  Though the amd64 GENERIC config has "device ix" and "device ixv" instead of
  "device ixgbe".

  This is achieved by making the if_ixgbe module a stub that depends
  on if_ix and if_ixv.

- Replace if_baudrate assignment with if_initbaudrate() call.

Thanks to jhb@ for the stub module suggestion and pointing out the if_baudrate
error.

Approved by:	jfv (mentor)
2015-05-28 20:56:11 +00:00
jhb
34675faa3b Fix COMPAT_FREEBSD32 build on ia64. This is a direct commit to
stable/10 since ia64 is not present in head.
2015-05-28 13:12:05 +00:00
whu
4530c56768 MFC r283053
Submitted by:	whu
Reviewed by:	royger
Approved by:	royger
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D2661
2015-05-28 09:20:35 +00:00
dim
fafc9e7ad4 MFC r283254:
Ensure that the static structs emitted by the MODULE_DEPEND() and
MODULE_VERSION() macros don't end up as .comm symbols, when all the
version fields are zero.

Normally, such symbols will end up in .bss, but for kernel module
version objects, this can lead to "garbage" version numbers.

Fix this by instructing the compiler to always put these structs in the
.data segment instead.

Reported by:	delphij, ae
2015-05-28 06:45:13 +00:00
mckusick
c94542bef3 MFC of 269533:
Limit the number of cylinder groups that will be searched when
trying to build a cluster. The limit is tunable using the sysctl
vfs.ffs.maxclustersearch. The current limit is 10 cylinder groups
per block allocation. It was previously limited to the number of
cylinder groups in the filesystem per block allocation. When there
were no clusters of the needed size left, it repeatedly searched
the whole filesystem for a non-existent cluster on every block
allocation. The result was very slow filesystem allocation with
100% CPU utilization. The old behavior can be had by setting
vfs.ffs.maxclustersearch to a huge number (1,000,000).

This change affects only the layout policy routines so is not able
to interfere with the integrity of the filesystem.

Reported by: Dmitry Sivachenko (demon@)
Tested by:   Dmitry Sivachenko (demon@)
2015-05-28 00:11:36 +00:00
erj
e12c5d1ed6 MFC ixgbe commits for 10.2:
- r280182 - Split the driver into independent pf/vf loadables
- r280197 - Resolve build issues
- r280204 - Fix multiple same-name devclasses
- r280228 - Fix i386 LINT build issues / remove unused variable
- r280252 - Fix building ixgbe with gcc
- r280962 - Make changes to busdma code similar to r257541
- r281772 & r281773 - Remove unused variable
- partial r282280 - stats counter update (ix-only)
- r282289 - Add X550 support
- r282290 - Add X550 makefile updates
- r282293 - Add ixgbe_x550.c to conf/files
- r282299 - Fix gcc compile (extraneous extern declaration)

Finally, add ix_txrx.c to conf/files because it's required for compile in stable/10.

Approved by:	jfv (mentor)
2015-05-27 17:44:11 +00:00
jhb
38c6ad8c69 MFC 282241:
Don't free mbufs when stopping an interface in netmap mode.

Currently if you ifconfig down a vtnet interface while it is being used
via netmap, the kernel panics due to trying to treat the cookie values
in the virtio rings as mbufs to be freed. When netmap is enabled, these
cookie values are pointers to something else.

Note that other netmap-aware drivers don't seem to need this as they
store the mbuf pointers in the software rings that mirror the hardware
descriptor rings, and since netmap doesn't touch those, the software
state always has NULL mbuf pointers causing the loops to free mbufs to
not do anything. However, vtnet reuses the same state area for both
netmap and non-netmap mode, so it needs to explicitly avoid looking at
the rings and treating the cookie values as mbufs if netmap is
enabled.

Sponsored by:	Norse Corp, Inc.
2015-05-27 14:29:39 +00:00