Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
usec_t is defined as 64 bit wide, but long is 32 bit on many archs.
|
|
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.
|
|
Another uninitialized variable marked as _cleanup_. Set it to NULL to
avoid accessing uninitialized memory.
|
|
Make sure to set _cleanup_ variables to NULL. Otherwise, we free
uninitialized objects.
|
|
'k' is marked as _cleanup_free_ so reset it to NULL if we free it
explicitly.
|
|
Make sure malloc() really returns non-NULL in lldp test.
|
|
https://github.com/vlajos/misspell_fixer
https://github.com/torstehu/systemd/commit/b6fdeb618cf2f3ce1645b3315f15f482710c7ffa
Thanks to Torstein Husebo <torstein@huseboe.net>.
|
|
* (potentially) public headers must reside in src/systemd/ (not in
src/libsystemd*)
* some private (not prefixed with sd_) functions moved from sd-lldp.h to
lldp-internal.h
* introduce lldp-util.h for the cleanup macro, as these should not be public
* rename the cleanup macro, we always name them _cleanup_foo_, never
_cleanup_sd_foo_
* mark some function arguments as 'const'
|
|
|
|
This patch introduces LLDP support to networkd. it implements the
receiver side of the protocol.
The Link Layer Discovery Protocol (LLDP) is an industry-standard,
vendor-neutral method to allow networked devices to advertise
capabilities, identity, and other information onto a LAN. The Layer 2
protocol, detailed in IEEE 802.1AB-2005.LLDP allows network devices
that operate at the lower layers of a protocol stack (such as
Layer 2 bridges and switches) to learn some of the capabilities
and characteristics of LAN devices available to higher
layer protocols.
|
|
|
|
|
|
|
|
Start the DHCPv6 test case by sending an Information Request, verifying
the reply and continuing at once with the normal address acquisition
procedure. Reuse the DHCPv6 Solicit Reply so that the client code is
verified to ignore any erroneously added IPv6 address information.
|
|
Implement Information Request message according to RFC 3315, section
18.1.5. with the excepion that the first message is not delayed by a
random amount. Instead systemd-networkd is supposed to take care of
desynchronizing between other clients.
Initialize the DHCPv6 client structure in sd_dhcp6_client_start()
as this allows toggling between information request and normal
DHCPv6 address aquisition modes.
|
|
Suppyling a NULL lease is not a condition that needs to be asserted,
returning -EINVAL is informative enough to the caller. This simplifies
calling code and doesn't falsely indicate that something erroneous was
attempted.
|
|
When all DHCPv6 options have been parsed, dhcp6_option_parse() returns
-ENOMSG. Explicitely set the return value to indicate success so that
later code does not need to take this special value into account.
|
|
inet_ntoa() uses a static buffer, so you can't call it twice in the
same fprintf() call.
|
|
|
|
This has been requested repeatedly, so let's give it a go. We explicitly do not allow matching
on names that have already been changed (from a previous udev run, or otherwise), and matching
on unpredictable names (ethX) is discouraged (but not currently disallowed).
We also currently allow:
[Match]
Name=veth0
[Link]
Name=my-name0
SomeOtherSetting=true
Which means that the link file will be applied the first time it is invoked, but
not on subsequent invocations, which may be surprising.
|