Lennart Poettering
d3cf48f4bd
networkd: run as unpriviliged "systemd-network" user
...
This allows us to run networkd mostly unpriviliged with the exception of
CAP_NET_* and CAP_SYS_MODULE. I'd really like to get rid of the latter
though...
2014-06-01 09:12:00 +02:00
Jonathan Boulle
865cc19a34
Fix several small typos
2014-05-24 19:01:03 -04:00
Tom Gundersen
68baa8faf3
sd-network: avoid false positive compiler warning caused by LTO
...
Djalal Harouni <tixxdz@opendz.org >:
There is also this one genrated by LTO, IMO it's a false positive since
we do *check* for "lease" but the code is not consistent since in that
code path, "lease" is initialized to NULL in other places, except for
this one:
src/resolve/resolved-manager.c: In function 'manager_update_resolv_conf':
src/libsystemd-network/sd-dhcp-lease.c:67:18: warning: 'lease' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (lease->dns_size) {
^
src/network/sd-network.c:146:24: note: 'lease' was declared here
sd_dhcp_lease *lease;
^
2014-05-24 00:46:30 +02:00
Kay Sievers
7e4f9431ca
Revert "update gitignore"
...
This reverts commit 351efdc7a4 .
2014-05-22 06:14:41 +09:00
Tom Gundersen
f5602be9da
networkd: link - serialize link when addresses change
...
Thanks to Kay for tracking this down.
2014-05-21 11:32:03 +02:00
Kay Sievers
351efdc7a4
update gitignore
2014-05-21 18:21:02 +09:00
Susant Sahani
abf446af60
networkd: introduce sit tunnel
...
This patch introduces sit tunnel support to networkd
Example conf:
file: sit.netdev
[NetDev]
Name=sit-tun
Kind=sit
MTUBytes=1480
[Tunnel]
Local=10.65.223.238
Remote=10.65.223.239
file: sit.network
[Match]
Name=em1
[Network]
Tunnel=sit-tun
[tomegun: rebased]
2014-05-19 22:50:23 +02:00
Tom Gundersen
473dfd7bd5
networkd-wait-online: wait for addresses to be configured
2014-05-19 22:00:35 +02:00
Tom Gundersen
e375dcde72
networkd/sd-network: extend operational states
...
Expose states 'degraded' or 'routable' if a link has a site/link-local or a routable address, respectively.
2014-05-19 20:44:21 +02:00
Tom Gundersen
bcb7a07e0a
networkd/sd-network: expose statically configured NTP servers
2014-05-19 18:42:14 +02:00
Tom Gundersen
d408b50681
networkd: fixup static DNS serialization
2014-05-19 18:14:56 +02:00
Tom Gundersen
81d98a39eb
sd-dhcp-lease/sd-network: modernization and fix leak
2014-05-19 18:14:56 +02:00
Tom Gundersen
091a364c80
resolved: add daemon to manage resolv.conf
...
Also remove the equivalent functionality from networkd.
2014-05-19 18:14:56 +02:00
Tom Gundersen
7dbf94a9c4
sd-network: expose DNS information
2014-05-19 18:14:56 +02:00
Tom Gundersen
7374f9d87c
networkd: link - serialize DNS information
2014-05-19 18:14:56 +02:00
Tom Gundersen
09bee74d7a
sd-dhcp-lease: move in_addr (de)serialization to shared network code
2014-05-19 18:14:56 +02:00
Tom Gundersen
16cd414ba0
networkd: log - only log about udev initalization on debug level
2014-05-17 20:51:37 +02:00
Tom Gundersen
428fd0a758
networkd: keep list of active addresses
2014-05-17 20:51:37 +02:00
Tom Gundersen
9505d3c6de
networkd: IP address equality
2014-05-17 20:46:11 +02:00
Tom Gundersen
ee9b9875fd
networkd: add missing files
2014-05-16 20:16:12 +02:00
Tom Gundersen
2dcf7ec6ec
networkd: manager - read fallback DNS servers from config file
...
We will still use the compiled-in defaults if no DNS entry exists in the config file.
2014-05-16 19:48:25 +02:00
Tom Gundersen
d4920165fe
networkd: network - store DNS servers in List rather than Set
...
This way we preserve the order of preference.
2014-05-16 19:48:25 +02:00
Tom Gundersen
e16cb2e4ef
networkd: hardcode a set of default dns servers
...
Similarly to NTP servers, this can be set at compile-time.
2014-05-16 17:19:04 +02:00
Tom Gundersen
3c4cb0645c
networkd: log the initialization status of links
2014-05-16 14:52:02 +02:00
Tom Gundersen
3d94b7870c
networkd: fix typo
2014-05-16 14:52:02 +02:00
Tom Gundersen
3d3d425547
networkd: rename Address and Route list fields
2014-05-16 14:52:02 +02:00
Tom Gundersen
987efa17dd
networkd: logging - align messages
2014-05-15 18:16:31 +02:00
Tom Gundersen
5261692fe5
networkd: log ifindices when links and netdevs are added
2014-05-15 18:16:31 +02:00
Tom Gundersen
af4e9e2c56
networkd: rename NetDev variable for consistency with Link
2014-05-15 18:15:21 +02:00
Zbigniew Jędrzejewski-Szmek
5ea846cc51
networkd, build-sys: spelling fix
2014-05-15 15:29:59 +02:00
Lennart Poettering
19befb2d5f
sd-bus: introduce sd_bus_slot objects encapsulating callbacks or vtables 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).
2014-05-15 01:15:30 +02:00
Susant Sahani
9ae7021104
networkd-ipip-tunnel: add support ttl
...
Add support for ipip tunnel ttl.
2014-05-12 18:15:31 +02:00
Tom Gundersen
0b44d8c3d7
networkd: manager - don't leak kmod context
...
Also, keep the kmod_new internal to networkd-manager.c
2014-05-12 17:37:58 +02:00
Susant Sahani
7951dea209
networkd: introduce ipip tunnel
...
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]
2014-05-12 17:37:12 +02:00
Tom Gundersen
fbbeb65a93
networkd: get preexiting addresses when a link is added
2014-05-11 14:26:10 +02:00
Tom Gundersen
2e9f08eaf1
networkd: listen for address changes
...
This is proof-of-concept only, as we only log the changes but don't do anything
with it.
2014-05-10 20:56:37 +02:00
Tom Gundersen
897e184c7d
rtnl: change from bitmask to enum for rtnl groups
...
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.
2014-05-10 20:56:37 +02:00
Tom Gundersen
389cc5f743
networkd: link - redo flag change logging
...
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.
2014-05-10 20:56:37 +02:00
Tom Gundersen
31d0ac36c6
networkd: network - fix leak
2014-05-10 20:56:37 +02:00
Tom Gundersen
86e6e5d1b4
networkd: manager - initialize variables
2014-05-10 20:56:37 +02:00
Tom Gundersen
5e273efec5
networkd: netdev - rephrase logging message a bit
...
Make it fit with what is logged from the link.
2014-05-10 20:56:37 +02:00
Tom Gundersen
4d473d5dde
networkd: manager - refactor link tracking a bit
2014-05-10 20:56:37 +02:00
Tom Gundersen
b90b025af1
networkd: link - don't log errors when missing routes/addresses are dropped
...
We were ignoring the wrong errno.
2014-05-09 14:41:27 +02:00
Tom Gundersen
7619683b46
networkd: link - handle links coming back to life
...
When enslaving devices, we may receieve DELLINK/NEWLINK for the same ifindex,
let's not be confused by this.
2014-05-09 14:41:27 +02:00
Tom Gundersen
d9c67ea112
networkd: reorder bonding and bridging
...
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.
2014-05-09 14:41:27 +02:00
Tom Gundersen
f22364691b
networkd: manager - drop links and netdevs when we receive DELLINK
2014-05-09 14:41:27 +02:00
Tom Gundersen
37ebeb77cf
networkd: netdev - drop if creation fails
...
This ensures that all links waiting to be enslaved are notified that the netdev does not exist.
2014-05-09 14:41:27 +02:00
Tom Gundersen
370e9930c3
networkd: link - introduce LINGER state and link_drop()
...
We need the LINGER state in case we still have references to the link after it has been dropped.
2014-05-09 14:41:27 +02:00
Tom Gundersen
2cc7e981af
networkd: netdev - introduce LINGER state and netdev_drop()
...
We need the LINGER state in case we still have references to the netdev after it has been dropped.
2014-05-09 14:41:27 +02:00
Tom Gundersen
59cb64e625
networkd: netdev - cancel all callbacks when freeing
...
This notifies the link that the netdev no longer exists.
2014-05-09 14:41:27 +02:00