summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
AgeCommit message (Collapse)Author
2015-10-21networkd: manager/link - only serialize once per event-loop iterationTom Gundersen
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-21networkd: link - serialize addressesTom Gundersen
2015-10-21networkd: address - distinguish between addresses added by us and by othersTom Gundersen
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-21networkd: address - merge _change() into _configure()Tom Gundersen
These functions are almost entirely the same, so avoid duplication.
2015-10-21networkd: link - only consider configured when all addresses are readyTom Gundersen
We were considering a link configured whilst its IPv6 addresses were still tentative. Fixes issue #650.
2015-10-16networkd: add support for configure IPv6 DADSusant Sahani
Configures Ipv6 Duplicate Address Detection. 10
2015-10-14Merge pull request #1530 from teg/network-fixes-2Lennart Poettering
networkd/libsystemd-network: collection of trivial patches v2
2015-10-12man: describe IPv6AcceptRouterAdvertisements= betterZbigniew Jędrzejewski-Szmek
With the previous description it wasn't clear that the kernel default is being described. Add link to kernel docs.
2015-10-11networkd: address - introduce address_is_ready()Tom Gundersen
Checks that a given address is not tentative nor deprecated.
2015-10-11networkd: make address_{establish,release}() staticTom Gundersen
No need to expose these functions, but rather call them from address_{add,drop}.
2015-10-11networkd: address - store active addresses in a Set rather than a ListTom Gundersen
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-11networkd: address - process in manager.c rather than link.cTom Gundersen
2015-10-11networkd: link - refactor (un)refTom Gundersen
2015-10-11networkd: link - fix error handling in link_add()Tom Gundersen
2015-10-11networkd: link/network - correctly align log messagesTom Gundersen
2015-10-11networkd: route/address - simplify and unify creatorsTom Gundersen
Rename new_dynamic() to simply _new() and reuse that from new_static().
2015-10-08networkd-link: remove unused variable assignment in link_save()reverendhomer
fixes Coverity #1317207
2015-09-24networkd: Be opportunistic when declaring link configuredPatrik Flykt
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-24Merge pull request #1356 from pfl/dhcp6_suspendTom Gundersen
DHCPv6 suspend fixes
2015-09-23networkd: Wait for DHCPv6 before announcing link configuredPatrik Flykt
Wait until DHCPv6 has acquired an address before announcing the link to be configured. Log the DHCPv6 lease lost event.
2015-09-23Set accept_ra to "2" if enabled in configGeorg Müller
This causes the kernel to accept router advertisments even if ip forwarding is enabled for this interface. This fixes #1340.
2015-09-22sd-lldp: hide internal detailsDavid Herrmann
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-12networkd:add support to configure ipv6 acceprt raSusant Sahani
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-07basic: rework virtualization detection APILennart Poettering
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-01Merge pull request #1108 from phomes/dont-shadow-globalsDavid Herrmann
tree-wide: do not shadow the global var timezone
2015-09-01tree-wide: do not shadow the global var timezoneThomas Hindoe Paaboel Andersen
2015-08-31networkd: dhcp-server - allow configuration of the poolTom Gundersen
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-31networkd: dhcp-server - default to manage the whole subnetTom Gundersen
Don't restrict yourselves to 32 leases, simply manage the whole subnet by default.
2015-08-31sd-dhcp-server: simplify pool creationTom Gundersen
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-30networkd: initialize tz to nullThomas Hindoe Paaboel Andersen
We may not set it before checking it for null.
2015-08-27networkd: propagate DNS/NTP server from uplink to dhcp serverLennart Poettering
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-27dhcp,network: support emitting DNS/NTP server information from DHCP serverLennart Poettering
For now, this is very simple and IP addresses have to be configured manually.
2015-08-27networkd: split up networkd.h into per-object header filesLennart Poettering
No functional changes, just moving definitions into separate header files.
2015-08-27networkd: properly reset transient hostname when we lose a DHCP leaseLennart Poettering
Previously we were setting the transient hostname again, rather than resetting it.
2015-08-27networkd: optionally push dhcp timezone into timedatedLennart Poettering
2015-08-27networkd: make DHCP lease timeouts configurableLennart Poettering
2015-08-26dhcp: keep lease save/load functions privateLennart Poettering
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-26dhcp,network: implement RFC 4833 (DHCP Timezone option)Lennart Poettering
This one is simply to add: encode the tzdata timezone in the DHCP options and optionally make use of it.
2015-08-25sd-network: make LLMNR specific config parser genericDaniel Mack
Rename the enum, the lookup functions and the parser for LLMNRSupport so the type can be reused for mDNS.
2015-08-21network: Save DNS and NTP data for a DHCPv6 linkPatrik Flykt
Append DNS and NTP data obtained via DHCPv6 when the Link is saved.
2015-07-30tree-wide: use free_and_strdup()Daniel Mack
Use free_and_strdup() where appropriate and replace equivalent, open-coded versions.
2015-07-29tree-wide: port everything over to fflush_and_check()Lennart Poettering
Some places invoked fflush() directly with their own manual error checking, let's unify all that by using fflush_and_check(). This also unifies the general error paths of fflush()+rename() file writers.
2015-07-24networkd: rename RootBlock to AllowPortToBeRootZbigniew Jędrzejewski-Szmek
Justification is similar to BPDUGuard rename. "Positive" values are easier. This is a rather uncommon option, so using a slightly longer name should not be a problem, and may in fact may make it easier to guess what the option does without reading the documentation.
2015-07-24networkd: rename BPDUGuard to UseBPDUZbigniew Jędrzejewski-Szmek
Rename to follow the follow the style of other options. In general "positive" options are preferred to "negative" ones, because they are easier to describe and easier for humans to parse (c.f. the shortening on the man page entry).
2015-07-23networkd: add bridge link propertiesSusant Sahani
new bridge properties br.network [Match] Name=enp0s25 [Network] Bridge=br-test [Bridge] Cost=332 BPDUGuard = true HairPin = true FastLeave = true RootBlock = true UnicastFlood = true
2015-07-06fileio: consolidate write_string_file*()Daniel Mack
Merge write_string_file(), write_string_file_no_create() and write_string_file_atomic() into write_string_file() and provide a flags mask that allows combinations of atomic writing, newline appending and automatic file creation. Change all users accordingly.
2015-07-06networkd: various fixes for the IPv6 privacy extensions supportLennart Poettering
- Make sure that the IPv6PrivacyExtensions=yes results in prefer-temporary, not prefer-public. - Introduce special enum value "kernel" to leave setting unset, similar how we have it for the IP forwarding settings. - Bring the enum values in sync with the the strings we parse for them, to the level this makes sense (specifically, rename "disabled" to "no", and "prefer-temporary" to "yes"). - Make sure we really set the value to to "no" by default, the way it is already documented in the man page. - Fix whitespace error. - Make sure link_ipv6_privacy_extensions() actually returns the correct enum type, rather than implicitly casting it to "bool". - properly size formatting buffer for ipv6 sysctl value - Don't complain if /proc/sys isn't writable - Document that the enum follows the kernel's own values (0 = off, 1 = prefer-public, 2 = prefer-temporary) - Drop redundant negating of error code passed to log_syntax() - Manpage fixes This fixes a number of issues from PR #417
2015-07-06networkd: be more defensive when writing to ipv4/ipv6 forwarding settingsLennart Poettering
1) never bother with setting the flag for loopback devices 2) if we fail to write the flag due to EROFS (which is likely to happen in containers where /proc/sys is read-only) or any other error, check if the flag already has the right value. If so, don't complain. Closes #469
2015-07-05networkd: Add support for ipv6 privacy extensionSusant Sahani
This patch add support for ipv6 privacy extensions. The variable /proc/sys/net/ipv6/conf/<if>/use_tempaddr can be changed via the boolean IPv6PrivacyExtensions=[yes/no/prefer-temporary] When true enables privacy extensions, but prefer public addresses over temporary addresses. prefer-temporary prefers temporary adresses over public addresses. Defaults to false. [Match] Name=enp0s25 [Network] IPv6PrivacyExtensions=prefer-temporary
2015-06-29networkd: netdev - avoid hanging transactions in failure casesTom Gundersen
If a link is attempted t obe enslaved by a netdev that has already failed, we must fail immediately and not save the callback for later, as it will then never get triggered.