Tom Gundersen
c1eb9872f6
networkd: link - serialize routes
2015-10-30 12:32:49 +01:00
Tom Gundersen
2ce4095690
networkd: route - rename fields in struct
2015-10-30 12:32:48 +01:00
Lennart Poettering
b5efdb8af4
util-lib: split out allocation calls into alloc-util.[ch]
2015-10-27 13:45:53 +01:00
Lennart Poettering
15a5e95075
util-lib: split out printf() helpers to stdio-util.h
2015-10-27 13:25:57 +01:00
Lennart Poettering
8b43440b7e
util-lib: move string table stuff into its own string-table.[ch]
2015-10-27 13:25:56 +01:00
Lennart Poettering
3ffd4af220
util-lib: split out fd-related operations into fd-util.[ch]
...
There are more than enough to deserve their own .c file, hence move them
over.
2015-10-25 13:19:18 +01:00
Tom Gundersen
ceabaf0fea
networkd: ndisc - make logging messages uniform
...
Refer to Router Discovery rather than ICMPv6.
2015-10-22 17:19:54 +02:00
Tom Gundersen
de1e9928f1
networkd: rename icmp6 to ndisc
2015-10-22 17:19:54 +02:00
Tom Gundersen
4d7b83da7b
sd-ndisc: rename API from sd-icmp6-nd
2015-10-22 17:19:54 +02:00
Tom Gundersen
84de38c569
networkd: manager/link - only serialize once per event-loop iteration
...
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.
2015-10-21 03:24:23 +02:00
Tom Gundersen
e7780c8d44
networkd: link - serialize addresses
2015-10-21 03:24:23 +02:00
Tom Gundersen
adda1ed94a
networkd: address - distinguish between addresses added by us and by others
...
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.
2015-10-21 02:35:31 +02:00
Tom Gundersen
6666907869
networkd: address - merge _change() into _configure()
...
These functions are almost entirely the same, so avoid duplication.
2015-10-21 02:35:31 +02:00
Tom Gundersen
8012cd3919
networkd: link - only consider configured when all addresses are ready
...
We were considering a link configured whilst its IPv6 addresses were still
tentative.
Fixes issue #650 .
2015-10-21 02:35:31 +02:00
Susant Sahani
8749cbcd4f
networkd: add support for configure IPv6 DAD
...
Configures Ipv6 Duplicate Address Detection.
10
2015-10-16 10:53:20 +05:30
Lennart Poettering
9ea79b459e
Merge pull request #1530 from teg/network-fixes-2
...
networkd/libsystemd-network: collection of trivial patches v2
2015-10-14 12:15:09 +02:00
Zbigniew Jędrzejewski-Szmek
ebf9808112
man: describe IPv6AcceptRouterAdvertisements= better
...
With the previous description it wasn't clear that the
kernel default is being described.
Add link to kernel docs.
2015-10-12 13:50:29 -04:00
Tom Gundersen
ce6c77ebf1
networkd: address - introduce address_is_ready()
...
Checks that a given address is not tentative nor deprecated.
2015-10-11 15:04:16 +02:00
Tom Gundersen
91b5f99731
networkd: make address_{establish,release}() static
...
No need to expose these functions, but rather call them from address_{add,drop}.
2015-10-11 15:04:16 +02:00
Tom Gundersen
cf1d700da3
networkd: address - store active addresses in a Set rather than a List
...
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.
2015-10-11 15:04:16 +02:00
Tom Gundersen
200a0868fc
networkd: address - process in manager.c rather than link.c
2015-10-11 15:04:16 +02:00
Tom Gundersen
957325b763
networkd: link - refactor (un)ref
2015-10-11 15:04:16 +02:00
Tom Gundersen
5c416fc408
networkd: link - fix error handling in link_add()
2015-10-11 15:04:16 +02:00
Tom Gundersen
a2fae7bbb2
networkd: link/network - correctly align log messages
2015-10-11 15:04:16 +02:00
Tom Gundersen
f0213e3796
networkd: route/address - simplify and unify creators
...
Rename new_dynamic() to simply _new() and reuse that from new_static().
2015-10-11 14:21:41 +02:00
reverendhomer
d4158938fc
networkd-link: remove unused variable assignment in link_save()
...
fixes Coverity #1317207
2015-10-08 14:43:03 +03:00
Patrik Flykt
3ada37a21e
networkd: Be opportunistic when declaring link configured
...
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
2015-09-24 15:20:41 +03:00
Tom Gundersen
5fecc33e32
Merge pull request #1356 from pfl/dhcp6_suspend
...
DHCPv6 suspend fixes
2015-09-24 00:55:49 +02:00
Patrik Flykt
18d29550b5
networkd: Wait for DHCPv6 before announcing link configured
...
Wait until DHCPv6 has acquired an address before announcing the link
to be configured. Log the DHCPv6 lease lost event.
2015-09-23 15:24:04 +03:00
Georg Müller
6a512301bb
Set accept_ra to "2" if enabled in config
...
This causes the kernel to accept router advertisments even if
ip forwarding is enabled for this interface.
This fixes #1340 .
2015-09-23 10:27:45 +02:00
David Herrmann
9ef61f2e48
sd-lldp: hide internal details
...
Currently, sd-lldp.h exports "UPDATE_INFO".. and defines it to a magic
constant '10'. This is completely bogus, so fix it to follow our coding
standards:
- Prefix exported symbols by SD_LLDP_*
- Define a separate event-enum for event types
- Translate internal state to external event-types
2015-09-22 15:19:42 +02:00
Susant Sahani
4f2e437ad7
networkd:add support to configure ipv6 acceprt ra
...
This patch support to configure the ipv6 acceprt ra option.
for more information see
http://www.tldp.org/HOWTO/Linux+IPv6-HOWTO/proc-sys-net-ipv6..html
2015-09-12 08:18:06 +05:30
Lennart Poettering
75f86906c5
basic: rework virtualization detection API
...
Introduce a proper enum, and don't pass around string ids anymore. This
simplifies things quite a bit, and makes virtualization detection more
similar to architecture detection.
2015-09-07 13:42:47 +02:00
David Herrmann
3a487d41d7
Merge pull request #1108 from phomes/dont-shadow-globals
...
tree-wide: do not shadow the global var timezone
2015-09-01 18:33:54 +02:00
Thomas Hindoe Paaboel Andersen
64d6c22905
tree-wide: do not shadow the global var timezone
2015-09-01 18:20:13 +02:00
Tom Gundersen
9b3a67c55b
networkd: dhcp-server - allow configuration of the pool
...
The constraints we place on the pool is that it is a contiguous
sequence of addresses in the same subnet as the server address, not
including the subnet nor broadcast addresses, but possibly including
the server address itself. If the server address is included in the
pool it is (obviously) reserved and not handed out to clients.
2015-08-31 21:42:33 +02:00
Tom Gundersen
61986155d2
networkd: dhcp-server - default to manage the whole subnet
...
Don't restrict yourselves to 32 leases, simply manage the whole subnet by default.
2015-08-31 21:42:11 +02:00
Tom Gundersen
9963469618
sd-dhcp-server: simplify pool creation
...
Merge sd_dhcp_server_set_address() and sd_dhcp_server_set_lease_pool() into
sd_dhcp_server_configure_pool() as the behavior of the two former depends
on the order they are called in. The flexibility is not needed, so let's
just do this in one call.
2015-08-31 21:34:58 +02:00
Thomas Hindoe Paaboel Andersen
0ab8a1b622
networkd: initialize tz to null
...
We may not set it before checking it for null.
2015-08-30 03:23:07 +02:00
Lennart Poettering
4f5f911e81
networkd: propagate DNS/NTP server from uplink to dhcp server
...
When handing out DHCP leases, try to propagate DNS/NTP server
information from "uplink". The "uplink" is automatically determined as
the network interface with the highest priority default route on it.
2015-08-27 16:45:24 +02:00
Lennart Poettering
1a04db0fc9
dhcp,network: support emitting DNS/NTP server information from DHCP server
...
For now, this is very simple and IP addresses have to be configured
manually.
2015-08-27 14:48:37 +02:00
Lennart Poettering
fc2f9534d0
networkd: split up networkd.h into per-object header files
...
No functional changes, just moving definitions into separate header
files.
2015-08-27 14:01:23 +02:00
Lennart Poettering
dce391e78f
networkd: properly reset transient hostname when we lose a DHCP lease
...
Previously we were setting the transient hostname again, rather than
resetting it.
2015-08-27 12:53:43 +02:00
Lennart Poettering
21b80ad126
networkd: optionally push dhcp timezone into timedated
2015-08-27 02:13:59 +02:00
Lennart Poettering
586ac6f711
networkd: make DHCP lease timeouts configurable
2015-08-27 01:47:42 +02:00
Lennart Poettering
bd91b83e57
dhcp: keep lease save/load functions private
...
When we make sd-dhcp public one day we really should not make
sd_dhcp_lease_save() and sd_dhcp_lease_load() public, since it's pretty
much only useful as internal utility for networkd itself.
2015-08-26 20:48:21 +02:00
Lennart Poettering
8eb9058dc1
dhcp,network: implement RFC 4833 (DHCP Timezone option)
...
This one is simply to add: encode the tzdata timezone in the DHCP
options and optionally make use of it.
2015-08-26 20:44:20 +02:00
Daniel Mack
a7e5da6e33
sd-network: make LLMNR specific config parser generic
...
Rename the enum, the lookup functions and the parser for LLMNRSupport so
the type can be reused for mDNS.
2015-08-25 14:26:01 +02:00
Patrik Flykt
07bdc70d16
network: Save DNS and NTP data for a DHCPv6 link
...
Append DNS and NTP data obtained via DHCPv6 when the Link is saved.
2015-08-21 11:23:22 +03:00
Daniel Mack
2fc09a9cdd
tree-wide: use free_and_strdup()
...
Use free_and_strdup() where appropriate and replace equivalent,
open-coded versions.
2015-07-30 13:09:01 +02:00