The idea is
tfilter.<parent>=[handle <handle>] <tfilter> [<options>] [action [<action options>...]]
What works now:
[tc]
qdisc.root=handle 1234: fq_codel
qdisc.ffff:fff1=ingress
tfilter.1234:=matchall action drop
tfilter.ffff:=matchall action simple sdata Hello
(cherry picked from commit 2e8fc6947d)
Printing a g_warning() from the library is not helpful.
Client-side, libnm should support newer server versions and changing
formats. To support forward-compatibility, it should parse the received
GVariant best-effort like, without complaining.
Server-side, libnm-core should return errors when receiving invalid
configuration. It must not maintain forward-compatibility, only
backward-compatibility -- which is implemented by handling old
and newer formats. But never should server allow a configuration
that is invalid.
Currently, the libnm API cannot yet fail at this point. Hence,
it cannot return an error. It would need a strict and relaxed
parsing mode. Until that exists, just comment out the warnings.
(cherry picked from commit 7cd2b6178d)
The actions are not too useful my themselves, but it will be possible to
embed them into traffic filters in subsequent commits.
(cherry picked from commit 7c8ce778fb)
The format for qdiscs is
qdisc.<parent>=[handle <handle>] <qdisc> [<options>...]
E.g.:
[tc]
qdisc.root=fq_codel handle de4d:
qdisc.ffff:fff1=ingress
That is pretty much what is supported at this point.
(cherry picked from commit 9d0eeb30b6)
We're going to need that one for TC filter & action support.
<linux/tc_act/tc_defact.h> was moved to user-space API only in 2013
by commit 5bc3db5c9ca8407f52918b6504d3b27230defedc. Our travis CI currently
fails to build due to that.
Re-implement the header.
(cherry picked from commit 82befe3c40)
It only makes sense to call delete() with NMPObjects that
we obtained from the platform cache. Otherwise, if we didn't
get it from the cache in the first place, we wouldn't know
what to delete.
Hence, the input argument is (almost) always an NMPObject
in the first place. That is different from add(), where
we might create a new specific NMPlatform* instance on the
stack. For add() it makes slightly more sense to have different
functions depending on the type. For delete(), it doesn't.
(cherry picked from commit 7573594a21)
"no_value" indicates that the the attribute is a single word, not a
key=value pair. If the type is BOOLEAN then the attribute is considered
true, if it's a STRING then the key is used instead of a value.
"consumes_rest" indicates that the particular key takes the unparseable
tail of the string for a value.
This allows parsing tc-style strings. Consider this filter:
,------ regular key/value pair
,-----'----.
root handle 1234: matchall action simple foo bar baz
| | `-----------.-----------'
| | `- "", STRING, consumes_rest
| `------------------- "kind", STRING, no_value
`-------------------------------------- "root', BOOLEAN, no_value
(cherry picked from commit 47b1dc3828)
There are a few cases where we don't want to clear a potential
nm-generated/volatile flag, but only mark the connection as
unsaved.
Otherwise, we wrongly end up clearing these flags and the connection
is wrongly not NM_DEVICE_SYS_IFACE_STATE_EXTERNAL.
Fixes: 35dc6421de
(cherry picked from commit 7044febf97)
We now have merged in libnm-core/tests/test-setting test file the test
files for 8021x, bond and dcb... add the new test file to .gitignore and
remove the old ones.
(cherry picked from commit 540b7b3dfd)