summaryrefslogtreecommitdiff
path: root/network
Commit message (Collapse)AuthorAgeFilesLines
* meson: Install missing network fileJan Janssen2023-01-271-0/+1
|
* network: change license of examples to MIT-0Zbigniew Jędrzejewski-Szmek2022-10-2611-22/+22
| | | | | | | | | | | | | | | Arguably, CC0 is just fine for examples since they are not code. But it's easier to be consistent and just use MIT-0 for all "documentation". Thus, the license is changed similarly code examples under man/. Based on 'git shortlog -ns network/*' and 'git log -p', the following folks should ack this: Zbigniew Jędrzejewski-Szmek Lennart Poettering Tom Gundersen Yu Watanabe Daan De Meyer Marc-André Lureau
* network: add example file that enables DHCP on ethernet linksZbigniew Jędrzejewski-Szmek2022-01-122-0/+18
| | | | | | | | The file has instructions how to "enable" it by symlinking into the appropriate place. If we create a different mechanism to do enablement later on, we can always adjust the instructions. Closes #3998.
* network: license all config files as CC0Zbigniew Jędrzejewski-Szmek2022-01-128-48/+80
| | | | | | | | Same justification as the previous commit. $ for i in network/*-*; do git blame $i;done | less shows that those files were written by Tom Gundersen, Lennart Poettering, Yu Watanabe, me, and Marc-André Lureau.
* network: say that our example files are licensed as CC0Zbigniew Jędrzejewski-Szmek2022-01-122-0/+22
| | | | | | This matches what we have for example programs under man/, and is nice because it allows people to copy the files as they wish without worrying about copyright. The files are too trivial to copyright anyway.
* network: dhcp-pd: add 6rd supportYu Watanabe2021-12-072-1/+20
| | | | Closes #19152.
* licensing: add missing header to one .network fileZbigniew Jędrzejewski-Szmek2021-10-011-0/+9
| | | | | It should have the full header because it will be installed onto user systems like the other .network files.
* network: add 80-container-vb.networkYu Watanabe2021-09-041-0/+22
|
* meson: use a/b instead of join_paths(a,b)Zbigniew Jędrzejewski-Szmek2021-07-271-1/+1
| | | | It is nicer and shorter.
* network: examples: use wlan for Type instead of wifiLucas Magasweran2021-05-103-3/+3
|
* network: use IPMasquerade=both instead of yesYu Watanabe2021-02-244-4/+4
| | | | Follow-up for 4c72d851cd007e945a85811f89376a2675daa1a5.
* networkd: Enable IPv6SendRA on builtin network filesDaan De Meyer2021-01-063-0/+3
| | | | | | | | | RAs trigger neighbor discovery which allows users to query the LL address of the container/VM via `ip neighbor get dev`. This is useful as it gives users an easy way to connect to the container without needing LLMNR or mDNS to resolve the hostname of the container to an IP address. In practice, this allows connecting with only networkd enabled and without resolved running in the host/container.
* meson: add option to skip installing to $sysconfdirJörg Thalheim2020-11-121-2/+4
| | | | | | | | | | | | | | | | | | | | | This is useful for development where overwriting files out side the configured prefix will affect the host as well as stateless systems such as NixOS that don't let packages install to /etc but handle configuration on their own. Alternative to https://github.com/systemd/systemd/pull/17501 tested with: $ mkdir inst build && cd build $ meson \ -Dcreate-log-dirs=false \ -Dsysvrcnd-path=$(realpath ../inst)/etc/rc.d \ -Dsysvinit-path=$(realpath ../inst)/etc/init.d \ -Drootprefix=$(realpath ../inst) \ -Dinstall-sysconfdir=false \ --prefix=$(realpath ../inst) .. $ ninja install
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-096-6/+6
|
* network: add TUN/TAP vt-* network rule for VMsMarc-André Lureau2020-04-172-0/+25
| | | | | VM typically use a TAP device, and work similarly to a veth device from the host side.
* Remove stray fileZbigniew Jędrzejewski-Szmek2020-04-061-0/+0
|
* sd-dhcp: Add support to emit and retrieve SMTP serverSusant Sahani2020-03-281-0/+0
|
* network: set AlternativeNamesPolicy= in 99-default.linkYu Watanabe2019-12-171-0/+1
|
* network: install wifi-adhoc.network by default, make wifi-{ap,station} examplesZbigniew Jędrzejewski-Szmek2019-10-303-0/+3
| | | | | | I think 80-wifi-adhoc.network is safe enough, since it just enables the link-local addressing. But the other two enable DHCP in client or server modes, and we should not do this by default.
* Merge pull request #13623 from yuwata/network-wifi-iftypeZbigniew Jędrzejewski-Szmek2019-10-253-0/+20
|\
| * network: add default configurations for wireless interfacesYu Watanabe2019-10-253-0/+20
|/
* udev,network: warn when .link or .network file has no [Match] sectionYu Watanabe2019-04-251-0/+3
| | | | Closes #12098.
* link-config: add "keep" policy and use it by defaultZbigniew Jędrzejewski-Szmek2019-01-171-1/+1
| | | | | | | | | | | | | | If "keep" policy is specified, and the interface has a name that is NET_NAME_USER or NET_NAME_RENAMED, we stop processing rules. "keep" should probably be specified either first or last depending on the preference. This partially reimplements 55b6530baacf4658a183b15b010a8cf3483fde08, in the sense that if the "keep" policy is not specified, and if the interface has a NamingPolicy, it will be renamed, even if it had a name previously. So this breaks backwards compatibility in this case, but that's more in line with what users expect. Closes #9006.
* Drop my copyright headersZbigniew Jędrzejewski-Szmek2018-06-141-2/+0
| | | | | | | perl -i -0pe 's/\s*Copyright © .... Zbigniew Jędrzejewski.*?\n/\n/gms' man/*xml git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/(#\n)?# +Copyright © [0-9, -]+ Zbigniew Jędrzejewski.*?\n//gms' git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s*\/\*\*\*\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*?\s*\*\*\*\/\s*/\n\n/gms' git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*//gms'
* tree-wide: beautify remaining copyright statementsLennart Poettering2018-06-141-1/+1
| | | | | | Let's unify an beautify our remaining copyright statements, with a unicode ©. This means our copyright statements are now always formatted the same way. Yay.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* Add license headers and SPDX identifiers to meson.build filesZbigniew Jędrzejewski-Szmek2017-11-191-0/+17
| | | | | | | So far I avoided adding license headers to meson files, but they are pretty big and important and should carry license headers like everything else. I added my own copyright, even though other people modified those files too. But this is mostly symbolic, so I hope that's OK.
* Add SPDX license headers to various assorted filesZbigniew Jędrzejewski-Szmek2017-11-194-0/+15
|
* build-sys: use #if Y instead of #ifdef Y everywhereZbigniew Jędrzejewski-Szmek2017-10-041-1/+1
| | | | | | | | | | | | | | | The advantage is that is the name is mispellt, cpp will warn us. $ git grep -Ee "conf.set\('(HAVE|ENABLE)_" -l|xargs sed -r -i "s/conf.set\('(HAVE|ENABLE)_/conf.set10('\1_/" $ git grep -Ee '#ifn?def (HAVE|ENABLE)' -l|xargs sed -r -i 's/#ifdef (HAVE|ENABLE)/#if \1/; s/#ifndef (HAVE|ENABLE)/#if ! \1/;' $ git grep -Ee 'if.*defined\(HAVE' -l|xargs sed -i -r 's/defined\((HAVE_[A-Z0-9_]*)\)/\1/g' $ git grep -Ee 'if.*defined\(ENABLE' -l|xargs sed -i -r 's/defined\((ENABLE_[A-Z0-9_]*)\)/\1/g' + manual changes to meson.build squash! build-sys: use #if Y instead of #ifdef Y everywhere v2: - fix incorrect setting of HAVE_LIBIDN2
* build-sys: drop automake supportZbigniew Jędrzejewski-Szmek2017-07-181-1/+0
| | | | | v2: - also mention m4
* meson: use booleans for conf.set and drop unecessary conditionalsZbigniew Jędrzejewski-Szmek2017-05-021-1/+1
| | | | | | | | | Using conf.set() with a boolean argument does the right thing: either #ifdef or #undef. This means that conf.set can be used unconditionally. Previously I used '1' as the placeholder value, and that needs to be changed to 'true' for consistency (under meson 1 cannot be used in boolean context). All checks need to be adjusted.
* meson: reindent all files with 8 spacesZbigniew Jędrzejewski-Szmek2017-04-231-8/+6
| | | | | | | The indentation for emacs'es meson-mode is added .dir-locals. All files are reindented automatically, using the lasest meson-mode from git. Indentation should now be fairly consistent.
* meson: fix condition for installation of .in units, 99-default.linkZbigniew Jędrzejewski-Szmek2017-04-231-1/+3
| | | | | | The condition to install in_units was calculated, but not used. 99-default.link should be installed uncoditionally.
* meson: use join_paths consistentlyMichael Biebl2017-04-231-1/+1
| | | | | With -Dsplit-usr=true, we set rootprefix to /. This leads to //lib/systemd or //lib/udev for various dir variables. Using join_paths() avoids this.
* meson: create dirs and touch /usrZbigniew Jędrzejewski-Szmek2017-04-231-0/+3
| | | | | | | | | This is the equivalent of $(INSTALL_DIRS) and install-touch-usr-hook. I did not bother to create the directories into which we install files, since they will be created anyway. v2: - remove bashism
* meson: build systemd using mesonZbigniew Jędrzejewski-Szmek2017-04-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's crucial that we can build systemd using VS2010! ... er, wait, no, that's not the official reason. We need to shed old systems by requring python 3! Oh, no, it's something else. Maybe we need to throw out 345 years of knowlege accumulated in autotools? Whatever, this new thing is cool and shiny, let's use it. This is not complete, I'm throwing it out here for your amusement and critique. - rules for sd-boot are missing. Those might be quite complicated. - rules for tests are missing too. Those are probably quite simple and repetitive, but there's lots of them. - it's likely that I didn't get all the conditions right, I only tested "full" compilation where most deps are provided and nothing is disabled. - busname.target and all .busname units are skipped on purpose. Otherwise, installation into $DESTDIR has the same list of files and the autoconf install, except for .la files. It'd be great if people had a careful look at all the library linking options. I added stuff until things compiled, and in the end there's much less linking then in the old system. But it seems that there's still a lot of unnecessary deps. meson has a `shared_module` statement, which sounds like something appropriate for our nss and pam modules. Unfortunately, I couldn't get it to work. For the nss modules, we need an .so version of '2', but `shared_module` disallows the version argument. For the pam module, it also didn't work, I forgot the reason. The handling of .m4 and .in and .m4.in files is rather awkward. It's likely that this could be simplified. If make support is ever dropped, I think it'd make sense to switch to a different templating system so that two different languages and not required, which would make everything simpler yet. v2: - use get_pkgconfig_variable - use sh not bash - use add_project_arguments v3: - drop required:true and fix progs/prog typo v4: - use find_library('bz2') - add TTY_GID definition - define __SANE_USERSPACE_TYPES__ - use join_paths(prefix, ...) is used on all paths to make them all absolute v5: - replace all declare_dependency's with [] - add more conf.get guards around optional components v6: - drop -pipe, -Wall which are the default in meson - use compiler.has_function() and compiler.has_header_symbol instead of the hand-rolled checks. - fix duplication in 'liblibsystemd' library name - use the right .sym file for pam_systemd - rename 'compiler' to 'cc': shorter, and more idiomatic. v7: - use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D - rename prefix to prefixdir, rootprefix to rootprefixdir ("prefix" is too common of a name and too easy to overwrite by mistake) - wrap more stuff with conf.get('ENABLE...') == 1 - use rootprefix=='/' and rootbindir as install_dir, to fix paths under split-usr==true. v8: - use .split() also for src/coredump. Now everything is consistent ;) - add rootlibdir option and use it on the libraries that require it v9: - indentation v10: - fix check for qrencode and libaudit v11: - unify handling of executable paths, provide options for all progs This makes the meson build behave slightly differently than the autoconf-based one, because we always first try to find the executable in the filesystem, and fall back to the default. I think different handling of loadkeys, setfont, and telinit was just a historical accident. In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs. In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin), but in Debian, those directories are not included in the path. C.f. https://github.com/mesonbuild/meson/issues/1576. - call all the options 'xxx-path' for clarity. - sort man/rules/meson.build properly so it's stable
* network: allow LLDP packets to cross non-customer bridges for container ↵Lennart Poettering2016-05-093-3/+3
| | | | | | | | | | | network interfaces This changes the default .network files we ship for nspawn containers to set EmitLLDP=customer-bridge in order to allow propagation of the LLDP packets across bridges. This is useful so that "networkctl status" shows all peers connected to a virtual container network, collecting this data via LLDP. This is safe since the default configuration for these interfaces does not bridge these links to external interfaces, but relies on IP routing for this.
* network: add automatic configuration for the networks created by nspawn ↵Lennart Poettering2016-05-093-0/+30
| | | | | | | --network-zone= This way, they "just work", similar to --network-veth behaves, as long as networkd is enabled and running on all involved nodes.
* network: turn on LLDP tx+rx for the default container network configurationLennart Poettering2016-02-212-0/+4
| | | | | Containers are relatively trusted and the veth tunnels are small networks, hence let's turn on LLDP both ways for them.
* networkd: emit DNS/NTP/Timezone info via DHCP server by defaultLennart Poettering2015-08-271-3/+0
| | | | If we have the data, emit it by default.
* network: turn on DHCP timezone passing between container and hostLennart Poettering2015-08-262-0/+6
| | | | | Let's turn on DHCP timezone passing from the host to a container, so that the timezone is always in sync.
* network: fix 'LinkLocal' -> 'LinkLocalAddressing' in network filesDavid Herrmann2015-02-142-2/+2
| | | | | | | | | | | | 'LinkLocal' was renamed to 'LinkLocalAddressing' in: commit 56fd6bf795926409b087bce406ea851ad89f9fe8 Author: Tom Gundersen <teg@jklm.no> Date: Sat Feb 14 00:32:26 2015 +0100 networkd: .network - rename LinkLocal to LinkLocalAddressing ..but apparently the network files were not updated. Fix this.
* networkd: generalize IPv4LL to LinkLocalTom Gundersen2015-02-092-2/+2
| | | | | | 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.
* network: IPMasquerade= implies IPForward=, hence remove itLennart Poettering2015-01-131-1/+0
|
* networkd: introduce an AddressFamilyBoolean enum typeLennart Poettering2015-01-131-1/+1
| | | | | | 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.
* doc: network - add comment about default prefix sizeTom Gundersen2015-01-131-0/+1
| | | | | | Should hopefully make it clear that this is not some magic value, just the default we picked. Suggested by Jan Engelhardt.
* networkd: add minimal IP forwarding and masquerading support to .network filesLennart Poettering2015-01-131-0/+2
| | | | | | | | | | | | | | 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.
* udev: link_setup - respect kernel name assign policyTom Gundersen2014-08-081-1/+1
| | | | | | | | | Newer kernels export meta-information about the origin of an ifname. Respect this from the ifname rename logic. We do not rename any interfaces that was originally named by userspace, nor once which have already been renamed from userspace. Moreover, we optionally do not (the default) rename interfaces which the kernel claims to have named in a predictable way.
* networkd: merge DHCPv4 and DHCPv6 configTom Gundersen2014-06-291-2/+1
| | | | | | | If there are v4 or v6 specific options we can keep those in separate sections, but for the common options, we will use only one. Moreovere only use DHCP=[yes/both|no/none|v4|v6] to enable or disable the clients.
* build-sys: add missing Makefile symlinkLennart Poettering2014-06-191-0/+1
|