summaryrefslogtreecommitdiff
path: root/src/network/networkd-network.c
AgeCommit message (Collapse)Author
2015-11-10networkd: Add support to configure IPV6 hop limitSusant Sahani
This patch adds support to configure IPV6 hop limit. For example: /proc/sys/net/ipv6/conf/wlp3s0/hop_limit
2015-10-30networkd: link - deserializeTom Gundersen
For now only deserialize some basic state and the applied addresses. When a link is added, try to deserialize it's state from /run. This is relevant only when networkd is restarted at runtime.
2015-10-30networkd: route - clean up confusion between 'metric' and 'priority'Tom Gundersen
Different tools use different terms for the same concept, let's try to stick with 'priority', as that is what the netlink API uses.
2015-10-30networkd: route - rename fields in structTom Gundersen
2015-10-27util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering
2015-10-27util-lib: move string table stuff into its own string-table.[ch]Lennart Poettering
2015-10-27util-lib: split stat()/statfs()/stavfs() related calls into stat-util.[ch]Lennart Poettering
2015-10-27util-lib: split string parsing related calls from util.[ch] into parse-util.[ch]Lennart Poettering
2015-10-25util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering
There are more than enough to deserve their own .c file, hence move them over.
2015-10-24util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering
string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
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-16networkd: add support for configure IPv6 DADSusant Sahani
Configures Ipv6 Duplicate Address Detection. 10
2015-10-11networkd: link/network - correctly align log messagesTom Gundersen
2015-09-30tree-wide: clean up log_syntax() usageLennart Poettering
- Rely everywhere that we use abs() on the error code passed in anyway, thus don't need to explicitly negate what we pass in - Never attach synthetic error number information to log messages. Only log about errors we *receive* with the error number we got there, don't log any synthetic error, that don#t even propagate, but just eat up. - Be more careful with attaching exactly the error we get, instead of errno or unrelated errors randomly. - Fix one occasion where the error number and line number got swapped. - Make sure we never tape over OOM issues, or inability to resolve specifiers
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-01tree-wide: do not shadow the global var timezoneThomas Hindoe Paaboel Andersen
2015-08-27networkd: emit DNS/NTP/Timezone info via DHCP server by defaultLennart Poettering
If we have the data, emit it by default.
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-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-26networkd: don't leak memory of Hostname= is used twice in a .network fileLennart Poettering
Also, we should only accept trailing dots where we have to, but not everywhere, hence be more strict when validating configured hostnames.
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-05Merge branch 'hostnamectl-dot-v2'Zbigniew Jędrzejewski-Szmek
Manual merge of https://github.com/systemd/systemd/pull/751.
2015-08-05hostname-util: get rid of unused parameter of hostname_cleanup()Zbigniew Jędrzejewski-Szmek
All users are now setting lowercase=false.
2015-08-05networkd: allow trailing dot on fqdn in config fileZbigniew Jędrzejewski-Szmek
2015-08-05hostname-util: add relax parameter to hostname_is_validZbigniew Jędrzejewski-Szmek
Tests are modified to check behaviour with relax and without relax. New tests are added for hostname_cleanup(). Tests are moved a new file (test-hostname-util) because there's now a bunch of them. New parameter is not used anywhere, except in tests, so there should be no observable change.
2015-07-27networkd: add support for macvtapSusant Sahani
This patch add support for macvtap. see http://virt.kernelnewbies.org/MacVTap
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: turn UnicastFlood on by defaultZbigniew Jędrzejewski-Szmek
Looking at the kernel commit, "on" seems to be the default value: commit 867a59436fc35593ae0e0efcd56cc6d2f8506586 Author: Vlad Yasevich <vyasevic@redhat.com> Date: Wed Jun 5 10:08:01 2013 -0400 bridge: Add a flag to control unicast packet flood. Add a flag to control flood of unicast traffic. By default, flood is on and the bridge will flood unicast traffic if it doesn't know the destination. When the flag is turned off, unicast traffic without an FDB will not be forwarded to the specified port. ... and it seems to be the reasonable thing to do by default.
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-10networkd: DHCP override hostnameSusant Sahani
This patch enhances the DHCP client to send the hostname reference http://lists.freedesktop.org/archives/systemd-devel/2014-July/021550.html Tested with Example conf: [Match] Name=eth1 [Network] DHCP=v4 [DHCP] SendHostname=true Hostname=test
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-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-11networkd: create "kernel" setting for IPForwardingNick Owens
In 5a8bcb674f71a20e95df55319b34c556638378ce, IPForwarding was introduced to set forwarding flags on interfaces in .network files. networkd sets forwarding options regardless of the previous setting, even if it was set by e.g. sysctl. This commit creates a new option for IPForwarding, "kernel", that preserves the sysctl settings rather than always setting them. See https://bugs.freedesktop.org/show_bug.cgi?id=89509 for the initial bug report.
2015-06-10libsystemd-network: use domain validation instead of hostname validation for ↵Nick Owens
dhcp domain option previously hostname_is_valid was used to validate domain names, which would silently drop perfectly valid dns names that were longer than a single dns label.
2015-05-18util: split all hostname related calls into hostname-util.cLennart Poettering
2015-05-12networkd: network_get - allow udev_device to be NULLTom Gundersen
In containers we never have udev devices, so drop the assert. This fixes an assertion introduced in af3aa302741b6edb0729925febb5f8bc26721fe3.
2015-04-29networkd: introduce vti6 tunnelSusant Sahani
This patch add support to create vti6 tunnel test: vt6.network [Match] Name=wlan0 [Network] Tunnel=ip6vti vti6.netdev [NetDev] Name=ip6vti Kind=vti6 [Tunnel] Local=2a00:ffde:4567:edde::4987 Remote=2001:473:fece:cafe::5179 ip link 11: ip6_vti0@NONE: <NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default link/tunnel6 :: brd :: 12: ip6vti@wlan0: <POINTOPOINT,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default link/tunnel6 2a00:ffde:4567:edde::4987 peer 2001:473:fece:cafe::5179
2015-04-21networkd: improve how networkd logs thingsLennart Poettering
This makes adds a couple of fixes: - Introduces log_netdev_error_errno() and friends, which takes an error number, and matches what log_link_error_errno() and friends do. - Replaces a lof ot strerror() usage with log_netdev_error_errno(), log_link_error_errno() and log_erro_errno() - Uppercases the first character of many log messages, after all this is supposed to be english language - Drops manual negating of error codes before passing them to log functions, the log functions all do that internally anyway. Some other minor fixes. Behaviour should not change really.
2015-03-27network: don't pass NULL to udev_device_get_driver()Tom Gundersen
2015-03-13Use space after a silencing (void)Zbigniew Jędrzejewski-Szmek
We were using a space more often than not, and this way is codified in CODING_STYLE.
2015-03-04networkd: Make DHCP client ID creation configurableJan Janssen
2015-02-27networkd: add support for Uplink Failure DetectionAlin Rauta
Introduce BindCarrier= to indicate the set of links that determine if the current link should be brought UP or DOWN. [tomegun: add a bit to commit message]
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2015-02-14networkd: network - rename ipv6token parserTom Gundersen
Too generic name.
2015-02-10net: support globbing and disjunction in Match logicTom Gundersen
Match{Name,OrginalName,Type,Driver,Path} can now take a space-separated glob of matches.
2015-02-09treewide: correct typos and use consistent "MAC" spellingTorstein Husebø
2015-02-09networkd: add support for IPv6 tokensTom Gundersen
This allows the admin to set the host-specific part of IPv6 addresses, but still receive the prefix via SLAAC. .network file snippet: [Network] IPv6Token=::12 gives: $ ip token token ::12 dev eth0 This closes https://bugs.freedesktop.org/show_bug.cgi?id=81177.
2015-02-09networkd: generalize IPv4LL to LinkLocalTom Gundersen
This allows both IPv4 and IPv6 link-local addresses to be enabled or disabled. By default we still enable IPv6LL and disable IPv4LL. The old config option is kept for backwards compatibility, but removed from the documentation.
2015-02-08networkd: add network_get_by_nameTom Gundersen