Commit Graph

236 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
2915234da0 bus: fix unitialized variable access in error path 2014-05-16 18:03:00 -04:00
Lennart Poettering
7e28adeb63 sd-bus: make sure we properly handle NULL callback functions 2014-05-15 18:09:20 +02:00
Lennart Poettering
b98490f7dc sd-bus: fix an assert when running in kdbus mode 2014-05-15 17:42:39 +02:00
Lennart Poettering
f2e2415d69 resolve: fix copy/paste error 2014-05-15 17:31:14 +02:00
Lennart Poettering
9e7e9a6524 sd-bus: don't hit assert when installing match 2014-05-15 17:26:02 +02:00
Lennart Poettering
1b64f83829 sd-bus: always keep slot reference while dispatching callback
Also, make sure we automatically destroy reply callbacks that are
floating.
2014-05-15 17:13:05 +02:00
Lennart Poettering
4a134c4903 sd-resolve: add "floating" resolve queries
Same story as for sd-bus and sd-event: allow passing NULL to store query
in in which case the query is freed automatically.
2014-05-15 17:13:05 +02:00
Lennart Poettering
a71fe8b8ae sd-event: introduce concept of "floating" event sources
These are the counterpart of "floating" bus slots, i.e. event sources
that are bound to the lifetime of the event object itself, and thus
don't require an explicit reference to be kept.
2014-05-15 17:13:04 +02:00
Zbigniew Jędrzejewski-Szmek
de0671ee7f Remove unnecessary casts in printfs
No functional change expected :)
2014-05-15 15:29:58 +02:00
Lennart Poettering
19befb2d5f sd-bus: introduce sd_bus_slot objects encapsulating callbacks or vtables attached to a bus connection
This makes callback behaviour more like sd-event or sd-resolve, and
creates proper object for unregistering callbacks.

Taking the refernce to the slot is optional. If not taken life time of
the slot will be bound to the underlying bus object (or in the case of
an async call until the reply has been recieved).
2014-05-15 01:15:30 +02:00
Lennart Poettering
04552566fa bus: add userdata API for bus name tracker objects 2014-05-14 22:58:43 +02:00
Susant Sahani
7951dea209 networkd: introduce ipip tunnel
This patch enables basic ipip tunnel support.
It works with kernel module ipip

example conf:

file: ipip.netdev

[NetDev]
Name=ipip-tun
Kind=ipip
MTUBytes=1480

[Tunnel]
Local=192.168.223.238
Remote=192.169.224.239
TTL=64

file: ipip.network

[Match]
Name=em1

[Network]
Tunnel=ipip-tun

[tomegun:
         - drop unused variable
         - take ref when enslaving]
2014-05-12 17:37:12 +02:00
Tom Gundersen
8fe65c03fc rtnl: message - fix check for broadcast messages 2014-05-10 20:56:37 +02:00
Tom Gundersen
66269b05cf rtnl: message - read group membership of incoming messages 2014-05-10 20:56:37 +02:00
Tom Gundersen
26349add97 rtnl: message - verify that we read the pending message size from the kernel
Reuse the auth-checking for both the peek and the real read.
2014-05-10 20:56:37 +02:00
Tom Gundersen
127dc4ea94 rtnl: message - move code around
No functional change.
2014-05-10 20:56:37 +02:00
Tom Gundersen
897e184c7d rtnl: change from bitmask to enum for rtnl groups
The bitmask is deprecated in the kernel, so move to the new interface. At the moment
this does not make a difference for us, but it avoids having to change the API in the future.
2014-05-10 20:56:37 +02:00
Tom Gundersen
f4e884dd1c sd-rtnl: message - add support for getting prefixlen from address messages 2014-05-10 20:56:37 +02:00
Lennart Poettering
73dec31974 sd-resolve: make sure we can destroy a query object from its own callback handler 2014-05-05 23:49:19 +02:00
Lennart Poettering
cc567911ba sd-event: allow disabling event sources when an event object is dying anyway 2014-05-05 23:48:25 +02:00
Lennart Poettering
59bc1fd776 sd-event: make it easy to bind signal handling to event loop exits
By passing a NULL callback provide a simple way to make event loops exit
on SIGTERM and other signals.
2014-05-05 23:47:59 +02:00
Tom Gundersen
7ca1d31964 sd-rtnl-message: append - fix uninitialized memory
We were not properly clearing the padding at the front of some containers.
2014-05-03 18:14:42 +02:00
Tom Gundersen
3f781aa8a0 sd-rtnl: route - allow setting multiple matching routes 2014-05-03 18:14:42 +02:00
Lennart Poettering
93f1bcf400 sd-resolve: rework sd-resolve to be callback based, similar in style to sd-bus and sd-event 2014-04-29 15:45:16 +02:00
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