Age | Commit message (Collapse) | Author |
|
|
|
networkd: fix asserts
|
|
There are more than enough to deserve their own .c file, hence move them
over.
|
|
|
|
|
|
|
|
|
|
|
|
Exported header files should not include internal headers. Fix that.
Exported header files should not use the bool type. So far we opted to
stick to C89 for exported headers, and hence use "int" for bools in
them. Continue to do so.
Exported header files should have #include lines for everything they use
including inttypes.h and sys/types.h, so that they may be included in
any order.
Exported header files should have C++ guards, hence add them.
Exported header files should not use gcc extensions like #pragma once,
get rid of it.
|
|
string-util.[ch]
There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.
This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.
Also touches a few unrelated include files.
|
|
The caller should push any lifetime information into the kernel and let the kernel handle
prefix expiration.
|
|
This ressurects 47d45d3cde45d6545367570264e4e3636bc9e345. We now always use /128 prefixes,
so there is no need for the DHCPv6 code to know about prefixes expiring.
|
|
The routing information should be configured separately by ND, there is no need to
indicate the prefix again in the DHCPv6 addresses.
See discussion and related links at issue #1520.
|
|
|
|
Refer to Router Discovery rather than ICMPv6.
|
|
|
|
|
|
The actual code rename will follow. The reason for the change of name is to make it
simpler and more uniform with how we name other libraries (we don't include the
underlying protocol). The new name also matches the naming in the kernel (which
is particularly relevent here as we expect to let the kernel do some parts of
the protocol and we do others).
|
|
fixes Coverity #1328493
|
|
Every time the state is written out we may trigger third-party apps, so
let's be a bit more careful about writing this out unnecessarily.
|
|
|
|
|
|
|
|
We only keep the addresses that we added ourselves in link->addresses, and
introduce a new set link->addresses_foreign to keep addresses of unknown
origin.
Only functional change is that "foreign" addresses no longer prevent a link
from entering "configured" state.
|
|
Establish the firewall rule before creating the address, and do not create the address
if the firewall rule could not be created. Also, only drop the firewall rule once
the address has been removed from the kernel.
|
|
These functions are almost entirely the same, so avoid duplication.
|
|
Call back into link_check_ready() whenever an address state change may have
made a link ready.
|
|
We were considering a link configured whilst its IPv6 addresses were still
tentative.
Fixes issue #650.
|
|
Configures Ipv6 Duplicate Address Detection.
10
|
|
networkd/libsystemd-network: collection of trivial patches v2
|
|
With the previous description it wasn't clear that the
kernel default is being described.
Add link to kernel docs.
|
|
Checks that a given address is not tentative nor deprecated.
|
|
No need to expose these functions, but rather call them from address_{add,drop}.
|
|
Don't allocate Address objects only to free them again when processing
rtnl events.
|
|
We need to be able to look these things up quickly as we will be updating them
continuously and there can in principle be many of them.
|
|
|
|
|
|
|
|
|
|
Add compare_func and hash_func for the Address object. The notion of
address equality is the same as in the kernel, and hashing preserves
preserves equality.
Two addresses are considered equal if:
- they have the same address family, and
- they are neither IPv4 nor IPv6 addresses, or
- the local addresses are identical, and
- they are IPv6 addresses, or
- they have the same prefixlength, and
- their peer prefixes are identical
This fixes a bug in the old equality check, which got the local address
and the peer prefix mixed up.
|
|
Freeing links/addresses may trigger sending signals over the bus, so let's make sure
the bus stays around until our own objects have been freed.
|
|
Rename new_dynamic() to simply _new() and reuse that from new_static().
|
|
fixes Coverity #1317207
|
|
networkd: add bridge properties
|
|
networkd: add support to configure preferred source of static routes
|
|
ForwardDelaySec: forward delay
HelloTimeSec: hello time
MaxAgeSec: maximum message age
for more information see
http://www.tldp.org/HOWTO/BRIDGE-STP-HOWTO/set-up-the-bridge.html
In kernel
br_dev_newlink: does not have the this functionality to set while
creation.
br_changelink: after creation we can change the parameters.
we need to first create then set it the parameters.
Introduce new callback post_create .This should
set the properties after the creation.
|
|
Let's clean up our tree a bit, and reduce invocations of the
thread-unsafe strerror() by replacing it with printf()'s %m specifier.
|
|
- Rely everywhere that we use abs() on the error code passed in anyway,
thus don't need to explicitly negate what we pass in
- Never attach synthetic error number information to log messages. Only
log about errors we *receive* with the error number we got there,
don't log any synthetic error, that don#t even propagate, but just eat
up.
- Be more careful with attaching exactly the error we get, instead of
errno or unrelated errors randomly.
- Fix one occasion where the error number and line number got swapped.
- Make sure we never tape over OOM issues, or inability to resolve
specifiers
|
|
This also allows us to drop build.h from a ton of files, hence do so.
Since we touched the #includes of those files, let's order them properly
according to CODING_STYLE.
|
|
The DHCP variable in the [Network] section of the network configuration
file moves the link to the configured state according to the following:
DHCP=yes Link is configured when either DHCPv4 or DHCPv6 succeed
DHCP=ipv4 Link is configured only when DHCPv4 succeeds
DHCP=ipv6 Link is configured only when DHCPv6 succeeds
DHCP=no Neither DHCPv4 or DHCPv6 is attempted
Reported by Martin Pitt.
Fixes https://github.com/systemd/systemd/issues/1368
|