Commit Graph
212 Commits
Author SHA1 Message Date
Lennart Poettering b2f8b02ec2 core: expose CFS CPU time quota as high-level unit properties 2014-04-25 13:27:25 +02:00
Kay Sievers 1d49b5aea9 bus: update kdbus.h 2014-04-24 10:36:19 +02:00
Daniel Buch 77c98a9eb1 test-resolve.c: Cleanup and make use of sockaddr_pretty() 2014-04-24 09:27:20 +02:00
Lennart Poettering 6b01f1d391 delta: draw arrows with draw_special_char()
Let's unify generation of unicode chars at one place.

Also, don't add an extra space into chars we print, except for the tree
chars where this is really necessary.
2014-04-23 19:06:39 +02:00
Lennart Poettering 1b02f30183 bus: simplification 2014-04-23 19:06:38 +02:00
Kay Sievers 26e376bfe3 bus: remove "on behalf" kdbus logic (ABI break) 2014-04-22 22:52:19 +02:00
Lukasz Skalski 6d6c604ac8 doc: fix items' names in PORTING-DBUS1 2014-04-20 23:06:48 -04:00
Thomas Hindoe Paaboel Andersen 6e37cd2f4a silence warnings 2014-04-21 00:03:22 +02:00
Tom Gundersen 6190b9f9d2 sd-rtnl: log when queues are exhausted 2014-04-20 10:28:28 +02:00
Tom Gundersen d4ef4f46cf sd-rtnl: socet_read_message - make sure we only shrink the partial rqueue when processing multi-part message 2014-04-19 20:32:01 +02:00
Tom Gundersen 6e20c8f8fa sd-rtnl: message - expose DUMP flag in the api 2014-04-19 16:47:52 +02:00
Tom Gundersen 7182867e79 sd-rtnl: add multi-part message test 2014-04-19 16:47:52 +02:00
Tom Gundersen 4e996881b2 sd-rtnl: message - concatenate multi-part messages from different packets 2014-04-19 16:47:52 +02:00
Tom Gundersen 24a026737d sd-rtnl: message - don't put NULL message on rqueue
If nothing interesting was receieved we should not put anything on
the queue.
2014-04-19 16:47:52 +02:00
Tom Gundersen 6fc518838c sd-rtnl: message - make room for all pending messages, not just the first
Also, don't actually read any of the message when peeking, just get its length.
2014-04-19 16:47:52 +02:00
Tom Gundersen b9ef681b04 sd-rtnl: message_addr - allow dumping of messages 2014-04-14 17:53:21 +02:00
Tom Gundersen a88f77c406 sd-rtnl: socket_read - use a read buffer
Rather than allocating/freeing memory for each message read, keep a global read buffer
in the rtnl object. Also, rather than using a fixed size, peek at the pending message
header to get the message size and reallocate as necessary.
2014-04-14 17:53:21 +02:00
Tom Gundersen 1403f45ab6 sd-rtnl: multi-part message - store as linked-list rather than independent messages
This means the API can stay the same as for single-part messages by simply passing the head message around. Unrefing
the head of the linked list unrefs the whole list.
2014-04-14 17:53:21 +02:00
Tom Gundersen e00d77ddd5 sd-rtnl: message_addr - expose a few more getters 2014-04-14 17:53:01 +02:00
Lennart Poettering bdb65e785a build-sys: add Makefile symlink 2014-04-13 17:41:02 -07:00
Tom Gundersen bc078e7163 sd-rtnl: use SO_PASSCRED
This unifies the socket handling with other sd-* libraries.
2014-04-11 00:52:23 +02:00
Kay Sievers 862bbf89c6 bus: catch up with kdbus changes (ABI break) 2014-04-10 13:27:23 -07:00
Kay Sievers dec51b29f9 bus: update kdbus.h 2014-04-10 13:02:35 -07:00
Tom Gundersen 1b89cf5648 sd-rtnl: don't drop multi-part messages
We still only return the first message part in callback/synchronous calls.
2014-04-10 19:40:48 +02:00
Tom Gundersen 77768cbabc sd-rtnl: use GREEDY_REALLOC for message queues 2014-04-10 19:00:36 +02:00
Zbigniew Jędrzejewski-Szmek 0830ba6189 build-sys: add newly used if_link.h defines to missing.h
Reported-by: Arnaud Gaboury <arnaud.gaboury@gmail.com>
2014-04-05 13:18:36 -04:00
Susant Sahani 0a827d105d sd-rtnl: fix broken test cases and add support for tunnel
This patch fixes the broken test-cases for sd-rtnl and add support for ipip
and sit tunnel.

[tomegun: minor fixups]
2014-04-03 18:09:24 +02:00
Umut Tezduyar Lindskog aba496a58a networkd: smooth transition from ipv4ll to dhcp address
Currently when both ipv4ll and dhcp are enabled, ipv4ll
address (if one has been claimed) is removed when dhcp
address is aquired. This is not the best thing to do
since there might be clients unaware of the removal
trying to communicate.

This patch provides a smooth transition between ipv4ll
and dhcp. If ipv4ll address was claimed [1] before dhcp,
address is marked as deprecated. Deprecated address is still
a valid address and packets can be received on it but address
cannot be selected as a source address. If dhcp lease cannot
be extended, then ipv4ll address is marked as valid again.

[1] If there is no collision, claiming IPv4LL takes between 4 to
7 seconds.
2014-04-03 16:00:25 +02:00
Tom Gundersen 689703f618 sd-rtnl: modernize a bit 2014-03-31 14:43:34 +02:00
Lukasz Skalski 5fa4ddb88c doc: fix items' names in PORTING-DBUS1 2014-03-31 14:23:49 +02:00
Steven Siloti c8a7165f58 sd-rtnl: fix off-by-one
Also fix type parameter passed to new0
2014-03-31 09:54:37 +02:00
Tom Gundersen 3cbbb3e678 sd-rtnl: types - hook up bond types
Reported by Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
2014-03-29 23:53:03 +01:00
Tom Gundersen 0834ff93c3 sd-rtnl: message - fix clang compile warning 2014-03-29 23:52:03 +01:00
Tom Gundersen aef0768e6c sd-rtnl: message - don't log about out-of-range attribute types
We will easily get these when running on newer kernels. However, we can safely ignore them as we
anyway don't know what to do with them.
2014-03-28 19:16:21 +01:00
Tom Gundersen d8e538ecd9 sd-rtnl: rework rtnl type system
Use a static table with all the typing information, rather than repeated
switch statements. This should make it a lot simpler to add new types.

We need to keep all the type info to be able to create containers
without exposing their implementation details to the users of the library.

As a freebee we verify the types of appended/read attributes.

The API is extended to nicely deal with unions of container types.
2014-03-28 19:11:59 +01:00
Tom Gundersen 9f5bbfe354 sd-rtnl: message - fix memory leak 2014-03-28 00:50:56 +01:00
Tom Gundersen 8c57830308 sd-rtnl: message - don't reference associated rtnl object
The object is not currently used, so just drop the refenence. If/when we end up
using the object in the future, we must make sure to deal with possible mutual
references between rtnl busses and their queued messages; as is done in sd-bus.
2014-03-28 00:50:50 +01:00
Thomas Hindoe Paaboel Andersen 9f2a50a300 silence warnings 2014-03-27 20:16:49 +01:00
Susant Sahani 9a6704a81f sd-rtnl: add support for tunnel attributes
Added support for tunneling netlink attrributes (ipip, gre, sit).
These works with kernel module ipip, gre and sit . The test cases are
moved to a separate file and manual test as well because they require
respective kernel modules as well.
2014-03-25 14:44:33 +01:00
Tom Gundersen 41ca2c206b sd-rtnl: message - don't try to enter unsupported containers
Currently we only support containers in RTM_*LINK messages.

Reported-by: "Thomas H.P. Andersen <phomes@gmail.com>"
2014-03-25 12:05:59 +01:00
Lennart Poettering 7514578081 sd-event: don't accidentally turn of watchdog timer event if we determine 0 2014-03-25 00:01:51 +01:00
Lennart Poettering 52444dc478 sd-event: initialization perturbation value right before we use it
That way, we don't forget to initialize it when the watchdog is
initialized before all event sources.
2014-03-24 23:54:21 +01:00
Lennart Poettering 56dc9aec21 sd-daemon: fix incorrect variable access 2014-03-24 23:54:14 +01:00
Lennart Poettering 79e16ce3bf networkd: fix a couple of memory leaks 2014-03-24 23:46:13 +01:00
Tom Gundersen 3caf0bc89b sd-rtnl: tests - drop redundant tests
These tests were both broken and redundant, so let's drop them.
2014-03-24 20:40:34 +01:00
Lennart Poettering 1cfc57e884 build-sys: add makefile link 2014-03-24 19:57:29 +01:00
Tom Gundersen e634cd4096 sd-rtnl: message parsing - log when ignoring message attributes 2014-03-24 16:59:31 +01:00
Tom Gundersen 3dd215e056 sd-rtnl: add sd_rtnl_message_enter_container()
Extend rta_offset_tb into a stack of offset tables, one for each parent of the
current container, and make sd_rtnl_message_{enter,exit}_container() pop/push
to this stack.

Also make sd_rtnl_message_rewind() parse the top-level container, and use this
when reading a message from the socket.

This changes the API by dropping the now redundant sd_rtnl_message_read()
method.
2014-03-24 16:59:30 +01:00
Daniel Mack e955c45881 sd-bus: invert bus->is_kernel check in sd_bus_get_peer_creds()
The bug was introducted in a3d59cd1 ("sd-bus: don't use assert_return()
to check for disconnected bus connections")
2014-03-24 14:45:34 +01:00
Lennart Poettering 3d94f76c99 util: replace close_pipe() with new safe_close_pair()
safe_close_pair() is more like safe_close(), except that it handles
pairs of fds, and doesn't make and misleading allusion, as it works
similarly well for socketpairs() as for pipe()s...
2014-03-24 03:22:44 +01:00