Age | Commit message (Collapse) | Author |
|
shuts up valgrind/sanitizers
|
|
compuler figure that out...
|
|
|
|
|
|
This reverts commit 6ec8e7c763b7dfa82e25e31f6938122748d1608f.
This doesn't fix any issues, just makes the code harder to read.
|
|
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;
^
|
|
|
|
|
|
CID #1237623.
|
|
We were using a space more often than not, and this way is
codified in CODING_STYLE.
|
|
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
|
|
|
|
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().
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
This fixes various issues found by globally reordering the include
sections of all .c files.
|
|
This reverts commit d6d810fbf8071f8510450dbacd1d083f37603656.
It's apparently not OK to pass MSG_CMSG_CLOEXEC to recvmsg() of raw
sockets.
|
|
This fixes the test-suite again.
|
|
Match{Name,OrginalName,Type,Driver,Path} can now take a space-separated glob of matches.
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
./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
|
|
|
|
|
|
Keep the expired prefix for the duration of the prefix expiration event
and remove it afterwards.
|
|
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.
|
|
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.
|
|
|
|
Update MTU according to the latest value received.
|
|
Each ICMPv6 structure has an interface index and will therefore be
associated with an IPv6 link containing a list of of prefixes.
|
|
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.
|
|
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.
|
|
|
|
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).
|
|
This is useful for testing.
|
|
Types used for pids and uids in various interfaces are unpredictable.
Too bad.
|
|
This will also be used in dhcp4-client.
|
|
We will use the same in both dhcp4 and dhcp6.
|
|
|
|
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>
|
|
This does not make a difference, but the code was confusing.
|
|
|