summaryrefslogtreecommitdiff
path: root/src/network
AgeCommit message (Collapse)Author
2017-02-22networkd: address config add error checkingSusant Sahani
We not looking for hashmap_put return error code.
2017-02-22networkd: Do not set config to NULL immediately.Susant Sahani
fd45e52 sets n to NULL which leads to crash. fixes: #5418
2017-02-17network: change condition in if testing section presenceZbigniew Jędrzejewski-Szmek
section_line and filename should be set together or not at all. Change the if to test filename, since it's the first of the pair and it seems more natural to test that.
2017-02-17networkd: immediately transfer ownership of route->sectionZbigniew Jędrzejewski-Szmek
The code was not incorrect previously, but I think it's easier to follow the ownership (and the code is more likely to remain correct when updated later on), if freeing of NetworkConfigSection* is immediately made the responsibility of route_free(), so instead of relying on route_free() not freeing ->section if adding to the network hashmap failed, make this freeing unconditional.
2017-02-16networkd: fix drop-in conf directory configs overwriting each otherSusant Sahani
Now we track the sections for example [Address] via line number. Which was fine till we din't had dropins dir. If we have multiple sections which have the ideantical line number in diffrent files we are overwriting these since line number is the key. This patch fixes this by taking filename and line number as key. This fixes [Address] and [Route] section overwriting. fixes: #5141
2017-02-11networkd: add IPv6ProxyNDPAddress support (#5174)Florian Klink
IPv6 Neighbor discovery proxy is the IPv6 equivalent to proxy ARP for IPv4. It is required when ISPs do not unconditional route IPv6 subnets to their designated target, but expect neighbor solicitation messages for every address on a link. A variable IPv6ProxyNDPAddress= is introduced to the [Network] section, each representing a IPv6 neighbour proxy entry in the neighbour table.
2017-01-25networkd: Allow ':' in labelSusant Sahani
IFA_LABEL does not need much of a validation except the length that is IFNAMSIZ as seen from kernel code.
2017-01-16ndisc: honor IPv6AcceptRA.UseDNS when parsing RA options (#5071)Cédric Schieli
RDNSS and DNSLL options received in RA are always used, possibly breaking the resolution of private domains hosted on a local DNS server. When setting UseDNS=no in a [IPv6AcceptRA] section of a .network file, both RDNSS and DNSLL options in received RA should be ignored. Fixes: #5040
2017-01-11networkd: reorder gperf fieldsZbigniew Jędrzejewski-Szmek
In eb64b435ebb2a7cb1274d5 ActiveSlave/PrimarySlave were inserted in between IPv6AcceptRA and IPv6AcceptRouterAdvertisements and the comment then didn't make sense. It turns out that gperf does not understand C-style comments, and that there's no comment syntax in the keywords section. The following was generated: {"/* legacy alias for the above */"}, {"Network.IPv6AcceptRA", config_parse_tristate, 0, offsetof(Network, ipv6_accept_ra)}, In practice this wouldn't lead to problems because this fake pattern would be hard to match, but it seems better to remove the comments altogether. Readers of the .gperf file will have to look for the repeated output field to notice legacy options. To make this easier, let's always keep the legacy option second.
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