Age | Commit message (Collapse) | Author |
|
attached to a bus connection
This makes callback behaviour more like sd-event or sd-resolve, and
creates proper object for unregistering callbacks.
Taking the refernce to the slot is optional. If not taken life time of
the slot will be bound to the underlying bus object (or in the case of
an async call until the reply has been recieved).
|
|
Add support for ipip tunnel ttl.
|
|
Also, keep the kmod_new internal to networkd-manager.c
|
|
This patch enables basic ipip tunnel support.
It works with kernel module ipip
example conf:
file: ipip.netdev
[NetDev]
Name=ipip-tun
Kind=ipip
MTUBytes=1480
[Tunnel]
Local=192.168.223.238
Remote=192.169.224.239
TTL=64
file: ipip.network
[Match]
Name=em1
[Network]
Tunnel=ipip-tun
[tomegun:
- drop unused variable
- take ref when enslaving]
|
|
|
|
This is proof-of-concept only, as we only log the changes but don't do anything
with it.
|
|
The bitmask is deprecated in the kernel, so move to the new interface. At the moment
this does not make a difference for us, but it avoids having to change the API in the future.
|
|
Make the logging less verbose by only printing all the changed flags on one line,
at the same time make it more complete by supporting all flags currently supported
by the kernel.
We still fall back to printing the raw flags in case we get something we do not recognize
This may be useful when running on new kernels.
|
|
|
|
|
|
Make it fit with what is logged from the link.
|
|
|
|
We were ignoring the wrong errno.
|
|
When enslaving devices, we may receieve DELLINK/NEWLINK for the same ifindex,
let's not be confused by this.
|
|
A link should only ever be part of one, but if we accidentally do both, let's do it
in the right order so the failure is more obvious in the logs.
|
|
|
|
This ensures that all links waiting to be enslaved are notified that the netdev does not exist.
|
|
We need the LINGER state in case we still have references to the link after it has been dropped.
|
|
We need the LINGER state in case we still have references to the netdev after it has been dropped.
|
|
This notifies the link that the netdev no longer exists.
|
|
We need to take a refcount on the link whenever we expect a callback. The exceptions
are the ipv4ll/dhcp clients as their lifetimes are guaranteed to be shorter than that
of the link.
|
|
|
|
|
|
|
|
Also keep the path to the lease file around rather than regenarating it all the time.
|
|
|
|
Otherwise the event will trigger immediately again.
|
|
by networkd
|
|
|
|
|
|
|
|
Also add a call to check if a link is loopback, as this should commonly be ignored.
|
|
|
|
|
|
|
|
|
|
Otherwise:
eth0: unknown link flags gained: 0x00040 (ignoring)
[tomegun: hiding these messages is ok, as IFF_RUNNING is redundant
and can be deduced from operstate and IFF_LOWER_UP]
|
|
Clarify that we are waiting for any link to reach 'carrier' state, regardless
of who manages it. This will be useful when we add support for waiting for more
operational states.
|
|
|
|
To make sure we don't delay boot on systems where (some) network links are managed by someone else
we don't block if something else has successfully brought up a link.
We will still block until all links we are aware of that are managed by networkd have been
configured, but if no such links exist, and someone else have configured a link sufficiently
that it has a carrier, it may be that the link is ready so we should no longer block.
Note that in all likelyhood the link is not ready (no addresses/routes configured),
so whatever network managment daemon configured it should provide a similar wait-online
service to block network-online.target until it is ready.
The aim is to block as long as we know networking is not fully configured, but no longer. This
will allow systemd-networkd-wait-online.service to be enabled on any system, even if we don't
know whether networkd is the main/only network manager.
Even in the case networking is fully configured by networkd, the default behavior may not be
sufficient: if two links need to be configured, but the first is fully configured before the
second one appears we will assume the network is up. To work around that, we allow specifying
specific devices to wait for before considering the network up.
This unit is enabled by default, just like systemd-networkd, but will only be pulled in if
anyone pulls in network-online.target.
|
|
introduced in 1e9be60bbabe179f5233217384f1daec757c17c7
|
|
|
|
This properly detects the state of the link based on both the link flags and the
operstate.
Moreover, always log state-changes even if we are not yet managing the link.
|
|
Avoid having two code-paths racing with eacother to do the same thing. The change
of flags will be detected in the normal way, so only use the link_up_handler
to detect if the 'up' failed and in that case fail the link.
|
|
|
|
|
|
|
|
This reverts commit cdc85c875b842b9309f72caefc51c262f521cf92.
There appears to be a kernel bug that (among other things) cause bridges
not to get a bridge id set when supplying IFLA_ADDRESS when creating the
netdev.
Simply revert the whole thing until we sort this out in the kernel.
See: http://www.spinics.net/lists/netdev/msg279807.html
Reported-by: C. R. Oldham <cr@saltstack.com>
|
|
|
|
MAC addreses are also set when NEWLINK messages are receieved, but only if the clients have
already been initialized.
|