2006-01-02 19:04:38 +01:00
|
|
|
|
|
|
|
|
|
2007-02-09 23:25:21 +09:00
|
|
|
|
2014-11-20 10:29:07 +01:00
|
|
|
|
2008-05-21 14:52:30 -07:00
|
|
|
|
2006-01-02 19:04:38 +01:00
|
|
|
|
|
|
|
|
|
2006-01-11 13:30:43 +01:00
|
|
|
|
2006-01-02 19:04:38 +01:00
|
|
|
|
|
|
|
|
|
2006-01-11 13:30:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-02 19:04:38 +01:00
|
|
|
|
2006-01-11 13:30:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-02 19:04:38 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-20 10:29:10 +01:00
|
|
|
|
2014-11-20 10:29:20 +01:00
|
|
|
|
2014-11-20 10:29:07 +01:00
|
|
|
|
2014-11-20 10:29:12 +01:00
|
|
|
|
2014-11-20 10:29:17 +01:00
|
|
|
|
2014-11-20 10:29:18 +01:00
|
|
|
|
2016-08-26 10:52:56 +02:00
|
|
|
|
2006-01-02 19:04:38 +01:00
|
|
|
|
|
|
|
|
|
2014-11-20 10:29:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-20 10:29:10 +01:00
|
|
|
|
2014-11-20 10:29:12 +01:00
|
|
|
|
|
|
|
|
|
2014-11-20 10:29:15 +01:00
|
|
|
|
2014-11-20 10:29:18 +01:00
|
|
|
|
2014-11-20 10:29:20 +01:00
|
|
|
|
2016-07-26 08:47:19 +02:00
|
|
|
|
|
|
|
|
|
2014-11-20 10:29:07 +01:00
|
|
|
|
|
|
|
|
|
2016-03-04 17:04:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-26 08:47:19 +02:00
|
|
|
|
|
|
|
|
|
2016-07-26 08:47:22 +02:00
|
|
|
|
2016-07-26 08:47:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-04 17:04:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-04-16 08:29:42 -07:00
|
|
|
|
|
|
|
|
|
2018-04-16 08:29:43 -07:00
|
|
|
|
|
|
|
|
|
2016-03-04 17:04:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tipc: support broadcast/replicast configurable for bc-link
Currently, a multicast stream uses either broadcast or replicast as
transmission method, based on the ratio between number of actual
destinations nodes and cluster size.
However, when an L2 interface (e.g., VXLAN) provides pseudo
broadcast support, this becomes very inefficient, as it blindly
replicates multicast packets to all cluster/subnet nodes,
irrespective of whether they host actual target sockets or not.
The TIPC multicast algorithm is able to distinguish real destination
nodes from other nodes, and hence provides a smarter and more
efficient method for transferring multicast messages than
pseudo broadcast can do.
Because of this, we now make it possible for users to force
the broadcast link to permanently switch to using replicast,
irrespective of which capabilities the bearer provides,
or pretend to provide.
Conversely, we also make it possible to force the broadcast link
to always use true broadcast. While maybe less useful in
deployed systems, this may at least be useful for testing the
broadcast algorithm in small clusters.
We retain the current AUTOSELECT ability, i.e., to let the broadcast link
automatically select which algorithm to use, and to switch back and forth
between broadcast and replicast as the ratio between destination
node number and cluster size changes. This remains the default method.
Furthermore, we make it possible to configure the threshold ratio for
such switches. The default ratio is now set to 10%, down from 25% in the
earlier implementation.
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-03-19 18:49:48 +07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-04 17:04:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-20 10:29:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2014-11-20 10:29:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2014-11-20 10:29:07 +01:00
|
|
|
|
2014-11-20 10:29:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2014-11-20 10:29:08 +01:00
|
|
|
|
|
|
|
|
|
2014-11-20 10:29:09 +01:00
|
|
|
|
2016-08-26 10:52:53 +02:00
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2016-08-26 10:52:53 +02:00
|
|
|
|
|
|
|
|
|
2014-11-20 10:29:09 +01:00
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2014-11-20 10:29:09 +01:00
|
|
|
|
2014-11-20 10:29:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2018-08-24 12:28:06 -07:00
|
|
|
|
2014-11-20 10:29:10 +01:00
|
|
|
|
2018-08-24 12:28:06 -07:00
|
|
|
|
2014-11-20 10:29:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2014-11-20 10:29:11 +01:00
|
|
|
|
2014-11-20 10:29:12 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2015-11-19 14:30:45 -05:00
|
|
|
|
2015-11-19 14:30:46 -05:00
|
|
|
|
2014-11-20 10:29:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2015-11-19 14:30:45 -05:00
|
|
|
|
2014-11-20 10:29:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2015-11-19 14:30:45 -05:00
|
|
|
|
2014-11-20 10:29:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2014-11-20 10:29:15 +01:00
|
|
|
|
|
|
|
|
|
2014-11-20 10:29:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2014-11-20 10:29:16 +01:00
|
|
|
|
2014-11-20 10:29:17 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2014-11-20 10:29:17 +01:00
|
|
|
|
2014-11-20 10:29:18 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2014-11-20 10:29:18 +01:00
|
|
|
|
2014-11-20 10:29:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2014-11-20 10:29:19 +01:00
|
|
|
|
2014-11-20 10:29:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2014-11-20 10:29:20 +01:00
|
|
|
|
2016-07-26 08:47:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2016-07-26 08:47:19 +02:00
|
|
|
|
|
|
|
|
|
2016-07-26 08:47:20 +02:00
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2016-07-26 08:47:20 +02:00
|
|
|
|
2016-07-26 08:47:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2016-07-26 08:47:22 +02:00
|
|
|
|
2016-07-26 08:47:20 +02:00
|
|
|
|
2016-08-18 10:33:52 +02:00
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2016-08-18 10:33:52 +02:00
|
|
|
|
2016-08-26 10:52:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-26 14:07:31 +02:00
|
|
|
|
2016-08-26 10:52:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-20 10:29:07 +01:00
|
|
|
|
|
|
|
|
|
2016-10-24 14:40:05 +02:00
|
|
|
|
2016-10-24 14:40:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-24 16:45:16 +10:00
|
|
|
|
2016-10-24 14:40:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-20 10:29:11 +01:00
|
|
|
|
|
|
|
|
|
2015-02-09 09:50:03 +01:00
|
|
|
|
2014-11-20 10:29:11 +01:00
|
|
|
|
2016-10-24 14:40:01 +02:00
|
|
|
|
2014-11-20 10:29:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
netlink: make validation more configurable for future strictness
We currently have two levels of strict validation:
1) liberal (default)
- undefined (type >= max) & NLA_UNSPEC attributes accepted
- attribute length >= expected accepted
- garbage at end of message accepted
2) strict (opt-in)
- NLA_UNSPEC attributes accepted
- attribute length >= expected accepted
Split out parsing strictness into four different options:
* TRAILING - check that there's no trailing data after parsing
attributes (in message or nested)
* MAXTYPE - reject attrs > max known type
* UNSPEC - reject attributes with NLA_UNSPEC policy entries
* STRICT_ATTRS - strictly validate attribute size
The default for future things should be *everything*.
The current *_strict() is a combination of TRAILING and MAXTYPE,
and is renamed to _deprecated_strict().
The current regular parsing has none of this, and is renamed to
*_parse_deprecated().
Additionally it allows us to selectively set one of the new flags
even on old policies. Notably, the UNSPEC flag could be useful in
this case, since it can be arranged (by filling in the policy) to
not be an incompatible userspace ABI change, but would then going
forward prevent forgetting attribute entries. Similar can apply
to the POLICY flag.
We end up with the following renames:
* nla_parse -> nla_parse_deprecated
* nla_parse_strict -> nla_parse_deprecated_strict
* nlmsg_parse -> nlmsg_parse_deprecated
* nlmsg_parse_strict -> nlmsg_parse_deprecated_strict
* nla_parse_nested -> nla_parse_nested_deprecated
* nla_validate_nested -> nla_validate_nested_deprecated
Using spatch, of course:
@@
expression TB, MAX, HEAD, LEN, POL, EXT;
@@
-nla_parse(TB, MAX, HEAD, LEN, POL, EXT)
+nla_parse_deprecated(TB, MAX, HEAD, LEN, POL, EXT)
@@
expression NLH, HDRLEN, TB, MAX, POL, EXT;
@@
-nlmsg_parse(NLH, HDRLEN, TB, MAX, POL, EXT)
+nlmsg_parse_deprecated(NLH, HDRLEN, TB, MAX, POL, EXT)
@@
expression NLH, HDRLEN, TB, MAX, POL, EXT;
@@
-nlmsg_parse_strict(NLH, HDRLEN, TB, MAX, POL, EXT)
+nlmsg_parse_deprecated_strict(NLH, HDRLEN, TB, MAX, POL, EXT)
@@
expression TB, MAX, NLA, POL, EXT;
@@
-nla_parse_nested(TB, MAX, NLA, POL, EXT)
+nla_parse_nested_deprecated(TB, MAX, NLA, POL, EXT)
@@
expression START, MAX, POL, EXT;
@@
-nla_validate_nested(START, MAX, POL, EXT)
+nla_validate_nested_deprecated(START, MAX, POL, EXT)
@@
expression NLH, HDRLEN, MAX, POL, EXT;
@@
-nlmsg_validate(NLH, HDRLEN, MAX, POL, EXT)
+nlmsg_validate_deprecated(NLH, HDRLEN, MAX, POL, EXT)
For this patch, don't actually add the strict, non-renamed versions
yet so that it breaks compile if I get it wrong.
Also, while at it, make nla_validate and nla_parse go down to a
common __nla_validate_parse() function to avoid code duplication.
Ultimately, this allows us to have very strict validation for every
new caller of nla_parse()/nlmsg_parse() etc as re-introduced in the
next patch, while existing things will continue to work as is.
In effect then, this adds fully strict validation for any new command.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-26 14:07:28 +02:00
|
|
|
|
|
|
|
|
|
2014-11-20 10:29:11 +01:00
|
|
|
|
|
|
|
|
|
2016-10-24 14:40:05 +02:00
|
|
|
|
2006-01-02 19:04:38 +01:00
|
|
|
|
2009-05-21 10:34:05 +00:00
|
|
|
|
2006-01-10 18:54:24 +00:00
|
|
|
|
2016-10-24 14:40:03 +02:00
|
|
|
|
2009-05-21 10:34:05 +00:00
|
|
|
|
2012-06-29 00:16:37 -04:00
|
|
|
|
2009-05-21 10:34:05 +00:00
|
|
|
|
|
|
|
|
|
2007-02-09 23:25:21 +09:00
|
|
|
|
2006-01-02 19:04:38 +01:00
|
|
|
|
|
|
|
|
|
2006-01-18 00:38:21 +01:00
|
|
|
|
2006-01-02 19:04:38 +01:00
|
|
|
|
2009-05-21 10:34:05 +00:00
|
|
|
|
2006-01-02 19:04:38 +01:00
|
|
|
|