summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl
AgeCommit message (Collapse)Author
2014-07-01networkd: netdev - add dummy supportTom Gundersen
2014-06-18socket-util: introduce in_addr_union similar to sockaddr_union and make use ↵Lennart Poettering
of it everywhere
2014-06-16sd-rtnl: add support for vxlan rtnl attributesSusant Sahani
This patch adds vxlan rtnl attributes to sd-rtnl
2014-06-02networkd: introduce vti tunnelSusant Sahani
This patch enables vti tunnel support. example conf: file : vti.netdev [NetDev] Name=vti-tun Kind=vti MTUBytes=1480 [Tunnel] Local=X.X.X.X Remote=X.X.X.X file: vti.network [Match] Name=em1 [Network] Tunnel=vti-tun TODO: Add more attributes for vti tunnel IFLA_VTI_IKEY IFLA_VTI_OKEY
2014-06-02networkd: introduce gre tunnelSusant Sahani
This patch enables gre tunnel support. example conf: file : gre.netdev [NetDev] Name=gre-tun Kind=gre MTUBytes=1480 [Tunnel] Local=X.X.X.X Remote=X.X.X.X file: gre.network [Match] Name=em1 [Network] Tunnel=gre-tun TODO: Add more attributes for gre tunnel IFLA_GRE_IFLAGS IFLA_GRE_IFLAGS IFLA_GRE_IKEY IFLA_GRE_OKEY
2014-05-12networkd: introduce ipip tunnelSusant Sahani
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-10rtnl: message - fix check for broadcast messagesTom Gundersen
2014-05-10rtnl: message - read group membership of incoming messagesTom Gundersen
2014-05-10rtnl: message - verify that we read the pending message size from the kernelTom Gundersen
Reuse the auth-checking for both the peek and the real read.
2014-05-10rtnl: message - move code aroundTom Gundersen
No functional change.
2014-05-10rtnl: change from bitmask to enum for rtnl groupsTom Gundersen
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-10sd-rtnl: message - add support for getting prefixlen from address messagesTom Gundersen
2014-05-03sd-rtnl-message: append - fix uninitialized memoryTom Gundersen
We were not properly clearing the padding at the front of some containers.
2014-05-03sd-rtnl: route - allow setting multiple matching routesTom Gundersen
2014-04-21silence warningsThomas Hindoe Paaboel Andersen
2014-04-20sd-rtnl: log when queues are exhaustedTom Gundersen
2014-04-19sd-rtnl: socet_read_message - make sure we only shrink the partial rqueue ↵Tom Gundersen
when processing multi-part message
2014-04-19sd-rtnl: message - expose DUMP flag in the apiTom Gundersen
2014-04-19sd-rtnl: add multi-part message testTom Gundersen
2014-04-19sd-rtnl: message - concatenate multi-part messages from different packetsTom Gundersen
2014-04-19sd-rtnl: message - don't put NULL message on rqueueTom Gundersen
If nothing interesting was receieved we should not put anything on the queue.
2014-04-19sd-rtnl: message - make room for all pending messages, not just the firstTom Gundersen
Also, don't actually read any of the message when peeking, just get its length.
2014-04-14sd-rtnl: message_addr - allow dumping of messagesTom Gundersen
2014-04-14sd-rtnl: socket_read - use a read bufferTom Gundersen
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-14sd-rtnl: multi-part message - store as linked-list rather than independent ↵Tom Gundersen
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-14sd-rtnl: message_addr - expose a few more gettersTom Gundersen
2014-04-11sd-rtnl: use SO_PASSCREDTom Gundersen
This unifies the socket handling with other sd-* libraries.
2014-04-10sd-rtnl: don't drop multi-part messagesTom Gundersen
We still only return the first message part in callback/synchronous calls.
2014-04-10sd-rtnl: use GREEDY_REALLOC for message queuesTom Gundersen
2014-04-05build-sys: add newly used if_link.h defines to missing.hZbigniew Jędrzejewski-Szmek
Reported-by: Arnaud Gaboury <arnaud.gaboury@gmail.com>
2014-04-03sd-rtnl: fix broken test cases and add support for tunnelSusant Sahani
This patch fixes the broken test-cases for sd-rtnl and add support for ipip and sit tunnel. [tomegun: minor fixups]
2014-04-03networkd: smooth transition from ipv4ll to dhcp addressUmut Tezduyar Lindskog
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-03-31sd-rtnl: modernize a bitTom Gundersen
2014-03-31sd-rtnl: fix off-by-oneSteven Siloti
Also fix type parameter passed to new0
2014-03-29sd-rtnl: types - hook up bond typesTom Gundersen
Reported by Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
2014-03-29sd-rtnl: message - fix clang compile warningTom Gundersen
2014-03-28sd-rtnl: message - don't log about out-of-range attribute typesTom Gundersen
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-28sd-rtnl: rework rtnl type systemTom Gundersen
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-28sd-rtnl: message - fix memory leakTom Gundersen
2014-03-28sd-rtnl: message - don't reference associated rtnl objectTom Gundersen
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-25sd-rtnl: add support for tunnel attributesSusant Sahani
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-25sd-rtnl: message - don't try to enter unsupported containersTom Gundersen
Currently we only support containers in RTM_*LINK messages. Reported-by: "Thomas H.P. Andersen <phomes@gmail.com>"
2014-03-24networkd: fix a couple of memory leaksLennart Poettering
2014-03-24sd-rtnl: tests - drop redundant testsTom Gundersen
These tests were both broken and redundant, so let's drop them.
2014-03-24sd-rtnl: message parsing - log when ignoring message attributesTom Gundersen
2014-03-24sd-rtnl: add sd_rtnl_message_enter_container()Tom Gundersen
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-24sd-event: rework API to support CLOCK_REALTIME_ALARM and ↵Lennart Poettering
CLOCK_BOOTTIME_ALARM, too
2014-03-23sd-rtnl: message - protect against SEGFAULT when reading messagesTom Gundersen
Make sure the returned data fits the datatype we requested. Otherwise return -EIO. Also fix a broken test that this exposed.
2014-03-23sd-rtnl: message - don't skip parts of message when parsingTom Gundersen
If a message type occurs repeatedly let the last one win. Also, don't skip type == MAX. Based on patch from: Susant Sahani <susant@redhat.com>
2014-03-22sd-rtnl: fix self-reference leaksDavid Herrmann
Like sd-bus, sd-rtnl can have self-references through queued messages. In particular, each queued message has the following self-ref loop: rtnl->wqueue[i]->rtnl == rtnl Same is true for "rqueue". When sd_rtnl_unref() gets called, we must therefore make sure we correctly consider each self-reference when deciding to destroy the object. For each queued message, there _might_ be one ref. However, rtnl-messages can be created _without_ a bus-reference, therefore we need to verify the actually required ref-count. Once we know exactly how many self-refs exist, and we verified none of the queued messages has external references, we can destruct the object. We must immediately drop our own reference, then flush all queues and destroy the bus object. Otherwise, each sd_rtnl_message_unref() call would recurse into the same destruction logic as they enter with the same rtnl-refcnt. Note: We really should verify _all_ queued messages have m->rtnl set to the bus they're queued on. If that's given, we can change: if (REFCNT_GET(rtnl->n_ref) <= refs) to if (REFCNT_GET(rtnl->n_ref) == refs) and thus avoid recalculating the required refs for each message we remove from the queue during destruction.