summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
AgeCommit message (Collapse)Author
2015-04-11shared: add random-util.[ch]Ronny Chevalier
2015-04-10shared: add process-util.[ch]Ronny Chevalier
2015-04-10Revert "sd-dhcp-client: fix strict aliasing issue"Lennart Poettering
This reverts commit 6ec8e7c763b7dfa82e25e31f6938122748d1608f. This doesn't fix any issues, just makes the code harder to read.
2015-03-27fix gcc warnings about uninitialized variablesHarald Hoyer
like: src/shared/install.c: In function ‘unit_file_lookup_state’: src/shared/install.c:1861:16: warning: ‘r’ may be used uninitialized in this function [-Wmaybe-uninitialized] return r < 0 ? r : state; ^ src/shared/install.c:1796:13: note: ‘r’ was declared here int r; ^
2015-03-14sd-dhcp-client: fix strict aliasing issueShawn Landden
2015-03-13test-dhcp-option: conform to usual coding styleZbigniew Jędrzejewski-Szmek
2015-03-13test-dhcp-option: add assert to check index is nonnegativeZbigniew Jędrzejewski-Szmek
CID #1237623.
2015-03-13Use space after a silencing (void)Zbigniew Jędrzejewski-Szmek
We were using a space more often than not, and this way is codified in CODING_STYLE.
2015-03-13tree-wide: there is no ENOTSUP on linuxDavid Herrmann
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
2015-03-12sd-pppoe: workaround for incomplete include in old kernelsZbigniew Jędrzejewski-Szmek
2015-03-04sd-dhcp6-client: delay setting the DUID and don't fail constructorThomas Haller
sd_dhcp6_client_new() tried to set the DUID based on the machine id. If the host has no /etc/machine-id, the constructor would fail making it impossible to create an sd_dhcp6_client instance. Relax this and create a DUID only later as needed. This way a caller caller can workaround a missing machine-id file and set a DUID of his choosing via sd_dhcp6_client_set_duid().
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2015-02-16Transpose args in strv_fnmatch() to be more ooZbigniew Jędrzejewski-Szmek
2015-02-16test-network: fix segfault with NULL dev_path/driver/type/nameZbigniew Jędrzejewski-Szmek
2015-02-16network-internal: chain matches with AND in net_match_config()Zbigniew Jędrzejewski-Szmek
The test would treat the first non-empty set of matches in match_paths, match_drivers, match_types, match_names as definitive (essentially chaining them with OR). Make those tests instead match like other tests and require all to pass if the set of patterns is nonempty.
2015-02-16Add helper for fnmatch over strvZbigniew Jędrzejewski-Szmek
2015-02-12Add missing includes in header filesThomas Hindoe Paaboel Andersen
This fixes various issues found by globally reordering the include sections of all .c files.
2015-02-12Revert "tree-wide: Always use recvmsg with MSG_CMSG_CLOEXEC"Lennart Poettering
This reverts commit d6d810fbf8071f8510450dbacd1d083f37603656. It's apparently not OK to pass MSG_CMSG_CLOEXEC to recvmsg() of raw sockets.
2015-02-11network-internal: fix inverted matchingTom Gundersen
This fixes the test-suite again.
2015-02-10net: support globbing and disjunction in Match logicTom Gundersen
Match{Name,OrginalName,Type,Driver,Path} can now take a space-separated glob of matches.
2015-02-10tree-wide: Always use recvmsg with MSG_CMSG_CLOEXECCristian Rodríguez
2015-02-10test-lldp: fix minor OOMLennart Poettering
2015-02-10test-lldp: initialize structs when we define themLennart Poettering
2015-02-10test-lldp: use strndup() where possibleLennart Poettering
2015-02-10libsystemd-network: Avoid potential NULL dereference in test-lldpPhilippe De Swert
As a malloc0 could fail, doing a strncpy without checking could cause issues. Adding an assert should be good enough and in line with other similar routines in the code. Found with Coverity Fixes: CID#1261402
2015-02-09treewide: correct typos and use consistent "MAC" spellingTorstein Husebø
2015-02-02test-dhcp-client: add a kludge to make valgrind happyZbigniew Jędrzejewski-Szmek
2015-02-02test-dhcp-client: open a real udp socket for test executionZbigniew Jędrzejewski-Szmek
./test-dhcp-client would attempt to operate fd 0, i.e. stdin. For example, './test-dhcp-client </dev/null' would fail with EPERM because /dev/null cannot be used with epoll. https://bugzilla.redhat.com/show_bug.cgi?id=1076119
2015-01-31test-dhcp-client: remove linebreakZbigniew Jędrzejewski-Szmek
2015-01-28sd-dhcp: chop of trailing dot of DHCP supplied host and domain namsLennart Poettering
2015-01-27sd-icmp6-nd: Add support for fetching the latest expired prefixPatrik Flykt
Keep the expired prefix for the duration of the prefix expiration event and remove it afterwards.
2015-01-27test-icmp6-nd: Add test cases for prefixesPatrik Flykt
Add test cases that feeds an Router Advertisement to the ICMPv6 code and verify that the correct prefix lengths are returned given an IPv6 address. Enhance the prefix verification test by adding a shorter prefix and check that the intended prefix lengths are now updated.
2015-01-27sd-icmp6-nd: Parse ICMPv6 prefix informationPatrik Flykt
Save each new onlink IPv6 prefix and attach an expiry timer to it. If the prefixes overlap, take the shorter prefix and write a debug message about the event. Once the prefix is resent in a Router Advertisement, update the timer. Add a new event for the expiring prefix. Add two helper functions, one for returning a prefix length given a Router Advertisement and the other for generic prefix matching given an IPv6 prefix and address.
2015-01-27test-icmp6-rs: Add trivial test case for an MTU that is not presentPatrik Flykt
2015-01-27sd-icmp6-nd: Add helper function to get the IPv6 link MTUPatrik Flykt
Update MTU according to the latest value received.
2015-01-27sd-icmp6-nd: Add link and prefix structures for ICMPv6Patrik Flykt
Each ICMPv6 structure has an interface index and will therefore be associated with an IPv6 link containing a list of of prefixes.
2015-01-27sd-icmp6-nd: Update Router Advertisement handlingPatrik Flykt
As the IPv6 prefixes are needed, update the ICMPv6 Router Advertisement code to dynamically allocate a suitably sized buffer. Iterate through the ICMPv6 options one by one returning error if the option length is too big to fit the buffer.
2015-01-27sd-dhcp6-lease: Revise address iteration functionsPatrik Flykt
Revise the address iteration functions so that one helper function resets the iterator to the start of the address list while the second one fetches addresses one by one. The test case is also updated.
2015-01-23#pragma once here and thereZbigniew Jędrzejewski-Szmek
2015-01-22sd-dhcp-client: use RFC4361-complient ClientID by defaultTom Gundersen
In addition to the benefits listed in the RFC, this allows DHCP to work also in case several interfaces share the same MAC address on the same link (IPVLAN). Note that this will make the ClientID (so probably the assigned IP address) change on upgrades. If it is desired to avoid that we would have to remember and write back the ID (which the library supports, but networkd currently does not).
2015-01-22dhcp-identifier: create IAID even if no udev device can be foundTom Gundersen
This is useful for testing.
2015-01-22Assorted format fixesZbigniew Jędrzejewski-Szmek
Types used for pids and uids in various interfaces are unpredictable. Too bad.
2015-01-21network: dhcp - split out dhcp_identifier_set_{iaid,duid_en} from dhcp6-clientTom Gundersen
This will also be used in dhcp4-client.
2015-01-21network: dhcp - split out the duid structure into a new header fileTom Gundersen
We will use the same in both dhcp4 and dhcp6.
2015-01-20sd-dhcp6-client: Remove unnecessary debug printoutPatrik Flykt
2015-01-15LLDP: Support locally assigned port subtypeSusant Sahani
The Zyxel switch sends port subtype as Locally assigned (7). Add LLDP_PORT_SUBTYPE_LOCALLY_ASSIGNED as supported type reported by Mantas Mikulėnas <grawity@gmail.com>
2015-01-13refcnt: refcnt is unsigned, fix comparisonsTom Gundersen
This does not make a difference, but the code was confusing.
2015-01-12network-intenal: user _cleanup_ macro in parse_ifnameTom Gundersen
2015-01-05libsystemd-network: fix typo in lldpTorstein Husebø
2015-01-01network: fix scanf/printf formatZbigniew Jędrzejewski-Szmek
usec_t is defined as 64 bit wide, but long is 32 bit on many archs.