summaryrefslogtreecommitdiff
path: root/src/network
AgeCommit message (Collapse)Author
2017-01-10networkd: RouteMetric for IPv6 Stateless Autoconfiguration (#5045)Susant Sahani
Add support to set route metric for IPv6 Fixes: #5002
2017-01-10build-sys: add check for gperf lookup function signature (#5055)Mike Gilbert
gperf-3.1 generates lookup functions that take a size_t length parameter instead of unsigned int. Test for this at configure time. Fixes: https://github.com/systemd/systemd/issues/5039
2016-12-22networkd: Rename ProxyARP to IPv4ProxyARP (#4947)Susant Sahani
Rename the arp proxy option to IPv4ProxyARP= in order to clarify its relationship to IPv4, and map to the various IPv6 options we have. Fixes: #4768
2016-12-21networkd: bond support primary slave and active slave (#4873)Susant Sahani
active_slave: Specifies the new active slave for modes that support it (active-backup, balance-alb and balance-tlb). primary slave: systemd-networks currently lacks the capability to set the primary slave in an active-backup bonding. This is necessary if you prefer one interface over the other. A common example is a eth0-wlan0 bonding on a laptop where you'd want to switch to the wired connection whenever it's available. Fixes: #2837
2016-12-21networkd: vxlan rename ARPProxy to ReduceARPProxy (#4891)Susant Sahani
Fixes: #4768
2016-12-19networkd-ndisc: handle missing mtu gracefully (#4913)Jörg Thalheim
At least bird's implementation of router advertisement does not set MTU option by default (instead it supplies an option to the user). In this case just leave MTU as it is.
2016-12-11Merge pull request #4859 from keszybz/networkdLennart Poettering
Networkd man page update and fixes for the fallout
2016-12-09networkd: check that VTI/VTI6 tunnels have a local addressZbigniew Jędrzejewski-Szmek
Otherwise we'd fail with an assertion: Assertion 't->family == AF_INET' failed at ../src/network/netdev/tunnel.c:244, function netdev_vti_fill_message_create(). Aborting.
2016-12-09networkd: tighten parsing of Tunnel addressesZbigniew Jędrzejewski-Szmek
When assigning addresses, we'd set the family, and later verify that the address on the other end has the same family. But when the address was specified as "any", we'd simply unset the family. Instead, only unset the family if both addresses are wiped. Also, don't bother setting family = AF_UNSPEC, since it's the default (0).
2016-12-09networkd: use log_netdev_error in a two more placesZbigniew Jędrzejewski-Szmek
2016-12-09networkd: do not print ": Success" in debug messageZbigniew Jędrzejewski-Szmek
%m isn't useful in success path.
2016-12-06networkd: Use dhcp correct type for IP port (#4840)Susant Sahani
Fixes: #4839
2016-12-06core: introduce parse_ip_port (#4825)Susant Sahani
1. Listed in TODO. 2. Tree wide replace safe_atou16 with parse_ip_port incase it's used for ports.
2016-12-05networkd: link_enter_configured remove assert (#4800)Susant Sahani
When we are in link_enter_configured we assume that the link->state should be LINK_STATE_SETTING_ROUTES but in some situation it's LINK_STATlE_SETTING_ADDRESSES. Just ignore the wrong state. Also since the return value not used any where make link_enter_configured return type void. Fixes: #4746
2016-12-02Merge pull request #4228 from dm0-/coreos-1554Zbigniew Jędrzejewski-Szmek
networkd: support marking links unmanaged
2016-12-01networkd: support marking links unmanagedDavid Michael
2016-11-30As per use case we should allow ForwardDelaySec to be set as 0 (#4765)Susant Sahani
So let's set ForwardDelaySec to USEC_INFINITY . Reference: https://wiki.linuxfoundation.org/networking/bridge#does-dhcp-work-overthrough-a-bridge
2016-11-28networkd: move event loop handling out of the manager (#4723)Tom Gundersen
This will allow us to have several managers sharing an event loop and running in parallel, as if they were running in separate processes. The long term-aim is to allow networkd to be split into separate processes, so restructure the code to make this simpler. For now we drop the exit-on-idle logic, as this was anyway severely restricted at the moment. Once split, we will revisit this as it may then make more sense again.
2016-11-24Merge pull request #4710 from martinpitt/networkd-dbusLennart Poettering
networkd: allow networkd to start in early boot
2016-11-23networkd: handle MTU field in IPv6 RA (#4719)Susant Sahani
This patch handles the custom MTU field in IPv6 RA. fixes RFE #4464
2016-11-23networkd: set DHCP-acquired timezone and hostname after connecting to D-BusMartin Pitt
If setting the received timezone or transient hostname fails because D-Bus is not (yet) up, store the data in the Manager object and try again after connecting to D-Bus.
2016-11-23networkd: fix size of MTUBytes so that it does not overwrites ARP (#4707)Susant Sahani
config_parse_iec_size overwrites the next varible that is ARP. Now the mtu is unsigned . Make it size_t . Fixes #4644
2016-11-23networkd: allow networkd to set the timezone in timedatedMartin Pitt
systemd-networkd runs as user "systemd-network" and thus is not privileged to set the timezone acquired from DHCP: systemd-networkd[4167]: test_eth42: Could not set timezone: Interactive authentication required. Similarly to commit e8c0de912, add a polkit rule to grant org.freedesktop.timedate1.set-timezone to the "systemd-network" system user. Move the polkit rules from src/hostname/ to src/network/ to avoid too many small distributed policy snippets (there might be more in the future), as it's easier to specify the privileges for a particular subject in this case. Add NetworkdClientTest.test_dhcp_timezone() test case to verify this (for all people except those in Pacific/Honolulu, there the test doesn't prove anything -- sorry ☺ ).
2016-11-23networkd: move setting hostname and timezone to ManagerMartin Pitt
Hostname and time zone are global settings, not link specific. Move these methods from Link into Manager.
2016-11-21networkd: do not automatically propagate bogus DNS/NTP serversLennart Poettering
Never propagate DNS/NTP servers on the local link via the DHCP server. The DNS/NTP servers 0.0.0.0 and 127.0.0.1 only make sense in the local context, hence never propagate them automatically to other hosts. Fixes: #4524
2016-11-21networkd: rename link_push_dns_to_dhcp_server() → ↵Lennart Poettering
link_push_uplink_dns_to_dhcp_server() Let's clarify that this is only relevant for pushing uplink DNS config data, not in any other context. (Same for NTP)
2016-11-21networkd: store DNS servers configured per-network as parsed addressesLennart Poettering
DNS servers must be specified as IP addresses, hence let's store them as that internally, so that they are guaranteed to be fully normalized always, and invalid data cannot be stored.
2016-11-21networkd: minor word extraction fixesLennart Poettering
Let's make the loops around extract_first_word() be more alike.
2016-11-21networkd: reorder fields in Network struct a bitLennart Poettering
Let's reorder them a bit, so that stuff that belongs together semantically is placed together (in particular, move the various DHCP "use" booleans together).
2016-11-21networkd: validate NTP server strings configured in .network filesLennart Poettering
Let's be a bit stricter, and make sure users only configure proper DNS names or IP addresses, but not any other strings.
2016-11-21networkd: rework how we set the hostname on the dhcp4 clientLennart Poettering
Let's split out the code into its own little function and let's use gethostname_strict() which already filters out localhost for us.
2016-11-14networkd: clean up main header file a bitTom Gundersen
Rename networkd.h to networkd-manager.h, to more accurately describe what it contains.
2016-11-13networkd: netdev - move to separate subdirectoryTom Gundersen
This could (and should) be made into a separate daemon, at least move the sourcefiles out for now.
2016-11-13networkd-wait-online: move to separate subdirectoryTom Gundersen
Also clean up the header files a bit.
2016-11-13networkd: network - apply() does not need to take the manager objectTom Gundersen
2016-11-10networkd: support setting dhcp client listen port (#4631)Susant Sahani
Allow setting custom port for the DHCP client to listen on in networkd. [DHCP] ListenPort=6677
2016-11-05tree-wide: drop unneded WHITESPACE param to extract_first_wordZbigniew Jędrzejewski-Szmek
It's the default, and NULL is shorter.
2016-11-02networkd: flush DNSSL/RDNSS lists when we lose carrierLennart Poettering
Fixes: #3870
2016-11-02netword: minor memory leak fixLennart Poettering
2016-10-26networkd : verify dns ip address when parsing configuration (#4492)Susant Sahani
Invalid IP addresses would be passed through as-is: $ networkctl status wlp3s0: ● 2: wlp3s0 Link File: /usr/lib/systemd/network/99-default.link Network File: /etc/systemd/network/wlp3s0.network Type: wlan State: routable (configured) Path: pci-0000:03:00.0 Driver: iwlwifi Vendor: Intel Corporation Model: Centrino Advanced-N 6205 [Taylor Peak] (Centrino Advanced-N 6205 AGN) HW Address: XXXXXXXXXX (Intel Corporate) Address: 192.168.2.103 XXXXXXXXXXX Gateway: 192.168.2.1 (Arcadyan Technology Corporation) DNS: 127.0.0.5553 Instead verify that DNS= has a valid list of addresses when parsing configuration. Fixes #4462.
2016-10-24networkd: fix mixup of bond options (#4470)Benjamin Richter
2016-10-24networkd-ndisc: Don't add NDisc route for local address (#4467)Patrik Flykt
When systemd-networkd is run on the same IPv6 enabled interface where radvd is announcing prefixes, a route is being set up pointing to the interface address. As this will fail with an invalid argument error, the link is marked as failed and the following message like the following will appear in in the logs: systemd-networkd[21459]: eth1: Could not set NDisc route or address: Invalid argument systemd-networkd[21459]: eth1: Failed Should the interface be required by systemd-networkd-wait-online, network-online.target will wait until its timeout hits thereby significantly delaying system startup. The fix is to check whether the gateway address obtained from NDisc messages is equal to any of the interface addresses on the same link and not set the NDisc route in that case.
2016-10-21Revert "add networkd dbus lease info" (#4435)Zbigniew Jędrzejewski-Szmek
2016-10-17networkd: use proper cast to access VTI6 (#4399)Susant Sahani
Fixes #4371.
2016-10-16tree-wide: use mfree moreZbigniew Jędrzejewski-Szmek
2016-10-11networkd: add dbus interface for lease raw options (#3528)Andrew Jeddeloh
Add a dbus object to represent dhcp leases and their raw options (i.e. options 224-254).
2016-10-11Merge pull request #4067 from poettering/invocation-idZbigniew Jędrzejewski-Szmek
Add an "invocation ID" concept to the service manager
2016-10-10networkd: rename Rename CheckSum → Checksum (#4312)Susant Sahani
2016-10-08networkd: address add support to configure flags (#4201)Susant Sahani
This patch enables to configure IFA_F_HOMEADDRESS IFA_F_NODAD IFA_F_MANAGETEMPADDR IFA_F_NOPREFIXROUTE IFA_F_MCAUTOJOIN
2016-10-07core: add "invocation ID" concept to service managerLennart Poettering
This adds a new invocation ID concept to the service manager. The invocation ID identifies each runtime cycle of a unit uniquely. A new randomized 128bit ID is generated each time a unit moves from and inactive to an activating or active state. The primary usecase for this concept is to connect the runtime data PID 1 maintains about a service with the offline data the journal stores about it. Previously we'd use the unit name plus start/stop times, which however is highly racy since the journal will generally process log data after the service already ended. The "invocation ID" kinda matches the "boot ID" concept of the Linux kernel, except that it applies to an individual unit instead of the whole system. The invocation ID is passed to the activated processes as environment variable. It is additionally stored as extended attribute on the cgroup of the unit. The latter is used by journald to automatically retrieve it for each log logged message and attach it to the log entry. The environment variable is very easily accessible, even for unprivileged services. OTOH the extended attribute is only accessible to privileged processes (this is because cgroupfs only supports the "trusted." xattr namespace, not "user."). The environment variable may be altered by services, the extended attribute may not be, hence is the better choice for the journal. Note that reading the invocation ID off the extended attribute from journald is racy, similar to the way reading the unit name for a logging process is. This patch adds APIs to read the invocation ID to sd-id128: sd_id128_get_invocation() may be used in a similar fashion to sd_id128_get_boot(). PID1's own logging is updated to always include the invocation ID when it logs information about a unit. A new bus call GetUnitByInvocationID() is added that allows retrieving a bus path to a unit by its invocation ID. The bus path is built using the invocation ID, thus providing a path for referring to a unit that is valid only for the current runtime cycleof it. Outlook for the future: should the kernel eventually allow passing of cgroup information along AF_UNIX/SOCK_DGRAM messages via a unique cgroup id, then we can alter the invocation ID to be generated as hash from that rather than entirely randomly. This way we can derive the invocation race-freely from the messages.