| Commit message (Collapse) | Author | Age |
|
|
|
| |
_free() should always succeed, even if object is not fully allocated.
|
|
|
|
|
|
|
| |
We failed to take a ref when waiting for udev synchronization. Fix that and also
make unreffing in callbacks simpler throughout by using _cleanup_ macros.
Fixes <https://bugs.freedesktop.org/show_bug.cgi?id=80556>.
|
| |
|
|
|
|
|
| |
The logic otherwise is that we leave anything preconfigured alone, but in the case of DHCP
we actually need to update it whenever the lease is renewed.
|
| |
|
|
|
|
| |
Don't wait for IPv4LL nor DHCP to finish before setting statically configured addresses.
|
|
|
|
|
|
| |
This adds support for DHCP options 33 and 121: Static Route and
Classless Static Route. To enable this feature, set UseRoutes=true
in .network file. Returned routes are added to the routing table.
|
|
|
|
|
|
|
| |
If there are v4 or v6 specific options we can keep those in separate sections,
but for the common options, we will use only one.
Moreovere only use DHCP=[yes/both|no/none|v4|v6] to enable or disable the clients.
|
|
|
|
|
|
| |
Note that /proc/sys/net/ipv4/ip_dynaddr needs to be non-zero.
[tomegun: hook up DHCP renew events to increase the lifetime when necessary]
|
| |
|
|
|
|
|
| |
When a link fails or looses carrier, always stop ongoing router
solicitation and any DHCPv6 client that may be running.
|
| |
|
|
|
|
|
| |
The link was unintentionally being unreferenced instead of referenced for the
MTU setup.
|
|
|
|
|
| |
Enable DHCPv6 support by creating a DHCPv6 boolean in the Network
section. Add necessary DHCPv6 structures and initial function calls.
|
|
|
|
|
|
| |
address on the interface
This way we can make use of the addresses of the IP pool.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an address is configured to be all zeroes, networkd will now
automatically find a locally unused network of the right size from a
list of pre-configured pools. Currently those pools are 10.0.0.0/8,
172.16.0.0/12, 192.168.0.0/16 and fc00::/7, i.e. the network ranges for
private networks. They are compiled in, but should be configurable
eventually.
This allows applying the same configuration to a large number of
interfaces with each time a different IP range block, and management of
these IP ranges is fully automatic.
When allocating an address range from the pool it is made sure the range
is not used otherwise.
|
|
|
|
|
|
| |
We were comparing against our own internal enum rather than the kernel exposed one.
Found by Thomas Ritter.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch enables netwokd to create vxlan
Changes:
Added:
1. File networkd networkd-vxlan.c
2. to netdev
bool learning
struct in_addr group
uint64_t vxlanid;
3. VXLAN subsection and config
parameters
|
|
|
|
|
|
| |
We could still have an old interface name and/or mac address when libudev
tells us that the device is initialized, as the up-to-date info could still
be on its way from the kernel.
|
|
|
|
|
|
|
| |
It should not be possible to have a DHCP lease on a link without also having
an associated network. Add assert() to avoid compiler warnings.
Reported by Thomas H. P. Andersen
|
| |
|
|
|
|
|
| |
Still add some whitespace betwen ifname and the message to get the
messages aligned (as I find it easier to spot specific messages this way).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When enabled in [Network] it will set up a dhcp server on the interface, listening
on one of its statically configured IPv4 addresses and with a fixed size pool of
leases determined from it.
Example:
[Match]
Name=ve-arch-tree
[Network]
Address=192.168.12.5/24
DHCPServer=yes
[Route]
Gateway=192.168.12.5
Destination=192.168.12.0/24
In this case we will configure ve-arch-tree with the address 192.168.12.5 and
hand out addresses in the range 192.168.12.6 - 192.168.12.38.
In the future, we should (as suggested by Lennart) introduce a syntax to pick the
server address automatically.
|
|
|
|
|
|
| |
Otherwise .netwrok matching on MAC address will not work.
Based on patch by Dave Reisner, and bug originally reported by Max Pray.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Configuration will be in
root:root /run/systemd/network
and state will be in
systemd-network:systemd-network /run/systemd/netif
This matches what we do for logind's seat/session state.
|
|
|
|
| |
Thanks to Kay for tracking this down.
|
|
|
|
| |
Expose states 'degraded' or 'routable' if a link has a site/link-local or a routable address, respectively.
|
| |
|
| |
|
|
|
|
| |
Also remove the equivalent functionality from networkd.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
|
|
|
| |
We need the LINGER state in case we still have references to the link after it has been dropped.
|
|
|
|
|
|
| |
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.
|