summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
Commit message (Collapse)AuthorAge
* Remove src/libsystemd-networkAndy Wingo2015-04-19
|
* fix gcc warnings about uninitialized variablesHarald Hoyer2015-03-27
| | | | | | | | | | | | | 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; ^
* sd-dhcp-client: fix strict aliasing issueShawn Landden2015-03-14
|
* test-dhcp-option: conform to usual coding styleZbigniew Jędrzejewski-Szmek2015-03-13
|
* test-dhcp-option: add assert to check index is nonnegativeZbigniew Jędrzejewski-Szmek2015-03-13
| | | | CID #1237623.
* Use space after a silencing (void)Zbigniew Jędrzejewski-Szmek2015-03-13
| | | | | We were using a space more often than not, and this way is codified in CODING_STYLE.
* tree-wide: there is no ENOTSUP on linuxDavid Herrmann2015-03-13
| | | | Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
* sd-pppoe: workaround for incomplete include in old kernelsZbigniew Jędrzejewski-Szmek2015-03-12
|
* sd-dhcp6-client: delay setting the DUID and don't fail constructorThomas Haller2015-03-04
| | | | | | | | | | 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().
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-23
| | | | | | 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.
* Transpose args in strv_fnmatch() to be more ooZbigniew Jędrzejewski-Szmek2015-02-16
|
* test-network: fix segfault with NULL dev_path/driver/type/nameZbigniew Jędrzejewski-Szmek2015-02-16
|
* network-internal: chain matches with AND in net_match_config()Zbigniew Jędrzejewski-Szmek2015-02-16
| | | | | | | | 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.
* Add helper for fnmatch over strvZbigniew Jędrzejewski-Szmek2015-02-16
|
* Add missing includes in header filesThomas Hindoe Paaboel Andersen2015-02-12
| | | | | This fixes various issues found by globally reordering the include sections of all .c files.
* Revert "tree-wide: Always use recvmsg with MSG_CMSG_CLOEXEC"Lennart Poettering2015-02-12
| | | | | | | This reverts commit d6d810fbf8071f8510450dbacd1d083f37603656. It's apparently not OK to pass MSG_CMSG_CLOEXEC to recvmsg() of raw sockets.
* network-internal: fix inverted matchingTom Gundersen2015-02-11
| | | | This fixes the test-suite again.
* net: support globbing and disjunction in Match logicTom Gundersen2015-02-10
| | | | Match{Name,OrginalName,Type,Driver,Path} can now take a space-separated glob of matches.
* tree-wide: Always use recvmsg with MSG_CMSG_CLOEXECCristian Rodríguez2015-02-10
|
* test-lldp: fix minor OOMLennart Poettering2015-02-10
|
* test-lldp: initialize structs when we define themLennart Poettering2015-02-10
|
* test-lldp: use strndup() where possibleLennart Poettering2015-02-10
|
* libsystemd-network: Avoid potential NULL dereference in test-lldpPhilippe De Swert2015-02-10
| | | | | | | | 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
* treewide: correct typos and use consistent "MAC" spellingTorstein Husebø2015-02-09
|
* test-dhcp-client: add a kludge to make valgrind happyZbigniew Jędrzejewski-Szmek2015-02-02
|
* test-dhcp-client: open a real udp socket for test executionZbigniew Jędrzejewski-Szmek2015-02-02
| | | | | | | | ./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
* test-dhcp-client: remove linebreakZbigniew Jędrzejewski-Szmek2015-01-31
|
* sd-dhcp: chop of trailing dot of DHCP supplied host and domain namsLennart Poettering2015-01-28
|
* sd-icmp6-nd: Add support for fetching the latest expired prefixPatrik Flykt2015-01-27
| | | | | Keep the expired prefix for the duration of the prefix expiration event and remove it afterwards.
* test-icmp6-nd: Add test cases for prefixesPatrik Flykt2015-01-27
| | | | | | | | | 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.
* sd-icmp6-nd: Parse ICMPv6 prefix informationPatrik Flykt2015-01-27
| | | | | | | | | | | | 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.
* test-icmp6-rs: Add trivial test case for an MTU that is not presentPatrik Flykt2015-01-27
|
* sd-icmp6-nd: Add helper function to get the IPv6 link MTUPatrik Flykt2015-01-27
| | | | Update MTU according to the latest value received.
* sd-icmp6-nd: Add link and prefix structures for ICMPv6Patrik Flykt2015-01-27
| | | | | Each ICMPv6 structure has an interface index and will therefore be associated with an IPv6 link containing a list of of prefixes.
* sd-icmp6-nd: Update Router Advertisement handlingPatrik Flykt2015-01-27
| | | | | | | 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.
* sd-dhcp6-lease: Revise address iteration functionsPatrik Flykt2015-01-27
| | | | | | | | 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.
* #pragma once here and thereZbigniew Jędrzejewski-Szmek2015-01-23
|
* sd-dhcp-client: use RFC4361-complient ClientID by defaultTom Gundersen2015-01-22
| | | | | | | | | 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).
* dhcp-identifier: create IAID even if no udev device can be foundTom Gundersen2015-01-22
| | | | This is useful for testing.
* Assorted format fixesZbigniew Jędrzejewski-Szmek2015-01-22
| | | | | Types used for pids and uids in various interfaces are unpredictable. Too bad.
* network: dhcp - split out dhcp_identifier_set_{iaid,duid_en} from dhcp6-clientTom Gundersen2015-01-21
| | | | This will also be used in dhcp4-client.
* network: dhcp - split out the duid structure into a new header fileTom Gundersen2015-01-21
| | | | We will use the same in both dhcp4 and dhcp6.
* sd-dhcp6-client: Remove unnecessary debug printoutPatrik Flykt2015-01-20
|
* LLDP: Support locally assigned port subtypeSusant Sahani2015-01-15
| | | | | | | 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>
* refcnt: refcnt is unsigned, fix comparisonsTom Gundersen2015-01-13
| | | | This does not make a difference, but the code was confusing.
* network-intenal: user _cleanup_ macro in parse_ifnameTom Gundersen2015-01-12
|
* libsystemd-network: fix typo in lldpTorstein Husebø2015-01-05
|
* network: fix scanf/printf formatZbigniew Jędrzejewski-Szmek2015-01-01
| | | | usec_t is defined as 64 bit wide, but long is 32 bit on many archs.
* lldp: fix sd_lldp_save()David Herrmann2014-12-31
| | | | | | | | | Fix a bunch of needless memzero() calls, a bunch of use-after-free regarding _cleanup_free_ and drop unused variables. Hint: Do NOT use _cleanup_free_ for temporary strappend() helpers that are freed multiple times. All you safe is the last free() call, which is really not worth the trouble resetting it to NULL all the time.
* lldp: fix uninitialized cleanup var #2David Herrmann2014-12-31
| | | | | Another uninitialized variable marked as _cleanup_. Set it to NULL to avoid accessing uninitialized memory.