summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl/rtnl-message.c
AgeCommit message (Collapse)Author
2015-01-22Assorted format fixesZbigniew Jędrzejewski-Szmek
Types used for pids and uids in various interfaces are unpredictable. Too bad.
2015-01-22Fix some format strings for enums, they are signedZbigniew Jędrzejewski-Szmek
2015-01-13refcnt: refcnt is unsigned, fix comparisonsTom Gundersen
This does not make a difference, but the code was confusing.
2014-12-30tree-wide: spelling fixesVeres Lajos
https://github.com/vlajos/misspell_fixer https://github.com/torstehu/systemd/commit/b6fdeb618cf2f3ce1645b3315f15f482710c7ffa Thanks to Torstein Husebo <torstein@huseboe.net>.
2014-12-29rtnl: recv_message - don't enforce sender uidTom Gundersen
All we care about is that the kernel (pid==0) sent the message. Verifying the sender uid seems to break when using userns. Reported by Stéphane Graber.
2014-12-29sd-rtnl: recv_message - drop message when peeking failsTom Gundersen
Read the message form the socket or we will loop trying to read the same message repeatedly.
2014-12-29sd-rtnl: recv_message - don't fail on interruptTom Gundersen
We should just try again instead.
2014-12-29sd-rtnl: recv_message - log when dropping messageTom Gundersen
We drop messages received from the wrong uid/pid, log this at debug level.
2014-12-18networkd: add FDB supportAlin Rauta
2014-12-09sd-rtnl: fix size check in sd_rtnl_message_append_string()Lennart Poettering
2014-12-08networkd: manager - enumerate addresses globally, rather than per-linkTom Gundersen
The kernel always returns all addresses, rather than only for the given link, so let's only enumerate once.
2014-12-08sd-rtnl: fix bogus warning about dropping 20 bytes from multi-part messagesTom Gundersen
Nothing was being dropped, we just failed to account for the NLMSG_DONE.
2014-12-04sd-rtnl: rename sd_rtnl_message_route_get_{dst,src}_len to *_prefixlenTom Gundersen
This makes the API more consistent.
2014-12-04networkd: add support for source routingTom Gundersen
2014-12-03rtnl: make checks for default routes more strictLennart Poettering
Also check that the source netmask is 0, not only the destination netmask.
2014-12-03nss-myhostname: always resolve the host name "gateway" to the local default ↵Lennart Poettering
gateway This is useful inside of containers or local networks to intrdouce a stable name of the default gateway host (in case of containers usually the host, in case of LANs usually local router).
2014-12-02sd-rtnl: route - allow GETROUTE with AF_UNSPECTom Gundersen
2014-12-02sd-rtnl: add sd_rtnl_message_{new_neigh,neigh_get_{family,ifindex}}Tom Gundersen
2014-12-02sd-rtnl: add a bit more debugging in case a message is droppedTom Gundersen
2014-12-02sd-rtnl: message - allow checking for attributes without reading out their ↵Tom Gundersen
contents
2014-12-02sd-rtnl: add sd_rtnl_message_route_get_familyTom Gundersen
2014-10-29sd-rtnl: add support to set packet family typeSusant Sahani
This patch adds functionality to set family type in the rtnl message for example PF_BRIDGE.
2014-10-29sd-rtnl: mark nested attributes with the NLA_F_NESTED flagTom Gundersen
The kernel mostly does not check this, but let's be consisntent and allways set it anyway. Based on patch from Susant Sahani.
2014-10-29sd-rtnl: fix reading of nla typeTom Gundersen
We must filter out the 'network-byteorder' and 'nested' flags.
2014-09-18sd-rtnl: rtnl-message: remove unneeded linux includesEmil Renner Berthing
2014-09-01sd-rtnl: don't assign to unused variableTom Gundersen
Reported by Thomas H.P. Andersen <phomes@gmail.com>.
2014-08-28sd-rtnl: log if kernel buffer is overrun as we currently can't handle that caseTom Gundersen
2014-08-12networkd: add minimal client tool "networkd" to query network statusLennart Poettering
In the long run this should become a full fledged client to networkd (but not before networkd learns bus support). For now, just pull interesting data out of networkd, udev, and rtnl and present it to the user, in a simple but useful output.
2014-07-23networkd: set route protocolDan Williams
All routes added by networkd are currently set RTPROT_BOOT, which according to the kernel means "Route installed during boot" (rtnetlink.h). But this is not always the case as networkd changes routing after boot too. Since the kernel gives more detailed protocols, use them. With this patch, user-configured static routes now use RTPROT_STATIC (which they are) and DHCP routes use RTPROT_DHCP. There is no define for IPv4LL yet, so those are installed as RTPROT_STATIC (though perhaps RTPROT_RA is better?). [tomegun: fixup src/network/networkd-link.c:972:33: error: too few arguments to function 'route_new_dynamic']
2014-07-18change type for address family to "int"Lennart Poettering
Let's settle on a single type for all address family values, even if UNIX is very inconsitent on the precise type otherwise. Given that socket() is the primary entrypoint for the sockets API, and that uses "int", and "int" is relatively simple and generic, we settle on "int" for this.
2014-07-18sd-rtnl: make string returned by sd_rtnl_message_read_string() constLennart Poettering
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-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-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: 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.