summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-network.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* networkd: add support for macvtapSusant Sahani2015-07-271-0/+1
| | | | | | This patch add support for macvtap. see http://virt.kernelnewbies.org/MacVTap
* networkd: rename RootBlock to AllowPortToBeRootZbigniew Jędrzejewski-Szmek2015-07-251-0/+1
| | | | | | | | 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.
* networkd: turn UnicastFlood on by defaultZbigniew Jędrzejewski-Szmek2015-07-251-0/+1
| | | | | | | | | | | | | | | | 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.
* networkd: rename BPDUGuard to UseBPDUZbigniew Jędrzejewski-Szmek2015-07-251-0/+2
| | | | | | | | 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).
* networkd: DHCP override hostnameSusant Sahani2015-07-101-0/+36
| | | | | | | | | | | | | | | | | | | 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
* networkd: various fixes for the IPv6 privacy extensions supportLennart Poettering2015-07-061-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* networkd: Add support for ipv6 privacy extensionSusant Sahani2015-07-051-0/+53
| | | | | | | | | | | | | | | | | | | | | 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
* networkd: create "kernel" setting for IPForwardingNick Owens2015-06-111-0/+34
| | | | | | | | | | | | 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.
* libsystemd-network: use domain validation instead of hostname validation for ↵Nick Owens2015-06-101-5/+11
| | | | | | | | 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.
* util: split all hostname related calls into hostname-util.cLennart Poettering2015-05-181-0/+1
|
* networkd: network_get - allow udev_device to be NULLTom Gundersen2015-05-121-11/+10
| | | | | | In containers we never have udev devices, so drop the assert. This fixes an assertion introduced in af3aa302741b6edb0729925febb5f8bc26721fe3.
* networkd: introduce vti6 tunnelSusant Sahani2015-04-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* networkd: improve how networkd logs thingsLennart Poettering2015-04-211-9/+6
| | | | | | | | | | | | | | | | | | | | 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.
* network: don't pass NULL to udev_device_get_driver()Tom Gundersen2015-03-271-6/+17
|
* Use space after a silencing (void)Zbigniew Jędrzejewski-Szmek2015-03-141-1/+1
| | | | | We were using a space more often than not, and this way is codified in CODING_STYLE.
* networkd: Make DHCP client ID creation configurableJan Janssen2015-03-041-0/+9
|
* networkd: add support for Uplink Failure DetectionAlin Rauta2015-02-271-0/+1
| | | | | | | 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]
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-231-1/+0
| | | | | | 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.
* networkd: network - rename ipv6token parserTom Gundersen2015-02-141-1/+1
| | | | Too generic name.
* net: support globbing and disjunction in Match logicTom Gundersen2015-02-101-4/+4
| | | | Match{Name,OrginalName,Type,Driver,Path} can now take a space-separated glob of matches.
* treewide: correct typos and use consistent "MAC" spellingTorstein Husebø2015-02-091-2/+2
|
* networkd: add support for IPv6 tokensTom Gundersen2015-02-091-1/+44
| | | | | | | | | | | | | | | | | 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.
* networkd: generalize IPv4LL to LinkLocalTom Gundersen2015-02-091-0/+33
| | | | | | 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.
* networkd: add network_get_by_nameTom Gundersen2015-02-081-2/+46
|
* networkd: Introduce ip6gre and ip6gretapSusant Sahani2015-01-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces ipv6 gre and gretap. test: ip6gre.netdev: [NetDev] Name=ip6gretap Kind=ip6gretap [Tunnel] Local=2a00:ffde:4567:edde::4987 Remote=2001:473:fece:cafe::5179 ip6gre.network: [Match] Name=eno16777736 [Network] Tunnel=ip6gretap ip link 6: ip6gre@eno16777736: <POINTOPOINT,NOARP> mtu 1448 qdisc noop state DOWN mode DEFAULT group default link/gre6 2a:00:ff:de:45:67:ed:de:00:00:00:00:00:00:49:87 peer 20:01:04:73:fe:ce:ca:fe:00:00:00:00:00:00:51:79
* networkd: Introduce IP6 tunnelSusant Sahani2015-01-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables networkd to create IP6 tunnels example conf: ipip6.netdev: [NetDev] Name=ipip6-tunnel Kind=ip6tnl [Tunnel] Mode=ip4ipv6 Local=2a00:ffde:4567:edde::4987 Remote=2001:473:fece:cafe::5179 ipip6.network [Match] Name=wlan0 [Network] Tunnel=ipip6-tunnel 23: ipip6-tunnel@wlan0: <POINTOPOINT,NOARP> mtu 1452 qdisc noop state DOWN mode DEFAULT group default link/tunnel6 2a00:ffde:4567:edde::4987 peer 2001:473:fece:cafe::5179
* networkd: introduce gretapSusant Sahani2015-01-221-0/+1
| | | | This patch introdeces gretap to networkd
* networkd: netdev - add ipvlan supportTom Gundersen2015-01-191-0/+1
|
* networkd: make IP forwarding for IPv4 and IPv6 individually configurableLennart Poettering2015-01-131-1/+5
|
* networkd: introduce an AddressFamilyBoolean enum typeLennart Poettering2015-01-131-28/+19
| | | | | | This introduces am AddressFamilyBoolean type that works more or less like a booleaan, but can optionally turn on/off things for ipv4 and ipv6 independently. THis also ports the DHCP field over to it.
* networkd: add minimal IP forwarding and masquerading support to .network filesLennart Poettering2015-01-131-4/+8
| | | | | | | | | | | | | | This adds two new settings to networkd's .network files: IPForwarding=yes and IPMasquerade=yes. The former controls the "forwarding" sysctl setting of the interface, thus controlling whether IP forwarding shall be enabled on the specific interface. The latter controls whether a firewall rule shall be installed that exposes traffic coming from the interface as coming from the local host to all other interfaces. This also enables both options by default for container network interfaces, thus making "systemd-nspawn --network-veth" have network connectivity out of the box.
* networkd: add FDB supportAlin Rauta2014-12-181-1/+12
|
* networkd: rename section [BridgePort] → [Bridge]Lennart Poettering2014-12-101-1/+1
| | | | | | Let's stick to generic sections that describe the general technology, instead of specific per-object sections, unless we really have a reason to do that otherwise.
* udev: link-config - simplify net-matchTom Gundersen2014-12-081-4/+4
|
* Check return value from reading name_assign_type attrDave Reisner2014-12-081-1/+2
| | | | This file won't exist on kernels earlier than 3.17.
* net_setup/networkd: warn if matching is done on possibly unstable ifnameTom Gundersen2014-12-051-3/+16
|
* networkd: add basic [Link] settings to .network filesTom Gundersen2014-12-051-1/+10
| | | | This allows the default link settings (set in .link files) to be overridden per Network. Only MTU and MACAddress is supported for now.
* udev: net_setup - allow matching on OriginalName=Tom Gundersen2014-12-041-1/+1
| | | | | | | | | | | | | | | | | | This has been requested repeatedly, so let's give it a go. We explicitly do not allow matching on names that have already been changed (from a previous udev run, or otherwise), and matching on unpredictable names (ethX) is discouraged (but not currently disallowed). We also currently allow: [Match] Name=veth0 [Link] Name=my-name0 SomeOtherSetting=true Which means that the link file will be applied the first time it is invoked, but not on subsequent invocations, which may be surprising.
* networkd: Add bridge port path costSusant Sahani2014-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add support to specify path cost of the bridge port to be configured via conf file. Exampe: conf file: br.netdev [NetDev] Name=br-test Kind=bridge file: br.network [Match] Name=em1 [Network] Bridge=br-test [BridgePort] Cost=332 bridge link 2: em1 state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-test state disabled priority 32 cost 332
* treewide: yet more log_*_errno + return simplificationsMichal Schmidt2014-11-281-4/+2
| | | | | | | | | | | | | Using: find . -name '*.[ch]' | while read f; do perl -i.mmm -e \ 'local $/; local $_=<>; s/(if\s*\([^\n]+\))\s*{\n(\s*)(log_[a-z_]*_errno\(\s*([->a-zA-Z_]+)\s*,[^;]+);\s*return\s+\g4;\s+}/\1\n\2return \3;/msg; print;' $f done And a couple of manual whitespace fixups.
* treewide: no need to negate errno for log_*_errno()Michal Schmidt2014-11-281-1/+1
| | | | It corrrectly handles both positive and negative errno values.
* treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt2014-11-281-1/+1
| | | | | | | | | | | | | As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
* hashmap: introduce hash_ops to make struct Hashmap smallerMichal Schmidt2014-09-151-3/+3
| | | | | | | | | It is redundant to store 'hash' and 'compare' function pointers in struct Hashmap separately. The functions always comprise a pair. Store a single pointer to struct hash_ops instead. systemd keeps hundreds of hashmaps, so this saves a little bit of memory.
* networkd: allow specification of DHCP route metricAngus Gibson2014-09-081-0/+1
| | | | | | This lets the routing metric for links to be specified per-network, still defaulting to DHCP_ROUTE_METRIC (1024) if unspecified. Hopefully this helps with multiple interfaces configured via DHCP.
* networkd: fix use-after-freeTom Gundersen2014-08-191-1/+3
| | | | Elements must be removed from the hashtable before they are freed.
* networkd: print nice warnings if people configure invalid domain namesLennart Poettering2014-08-151-7/+14
|
* networkd: fix minor memory leakLennart Poettering2014-08-151-0/+1
|
* networkd: remove "*" from domains listLennart Poettering2014-08-151-6/+6
| | | | | Also, simplify things a bit and make sure we don't forget looking at one of the entries.
* sd-network: add support for wildcard domainsTom Gundersen2014-08-151-0/+6
|
* networkd: add support for Domains= to .network filesTom Gundersen2014-08-151-0/+28
| | | | | This allows the search/routing domanis to be specified per link/network and be passed on to resolved.