1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00
Commit Graph

1553 Commits

Author SHA1 Message Date
Susant Sahani
30ae9dfda3 networkd: Introduce tun/tap device
This patch introduces TUN/TAP device creation support
to networkd.

Example conf to create a tap device:

file: tap.netdev
------------------
[NetDev]
Name=tap-test
Kind=tap

[Tap]
OneQueue=true
MultiQueue=true
PacketInfo=true
User=sus
Group=sus
------------------

Test:
1. output of ip link
tap-test: tap pi one_queue UNKNOWN_FLAGS:900 user 1000 group 1000

id:
uid=1000(sus) gid=10(wheel) groups=10(wheel),1000(sus)
context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

Modifications:

Added:
1. file networkd-tuntap.c
3. netdev kind NETDEV_KIND_TUN and NETDEV_KIND_TAP
2. Tun and Tap Sections and config params to parse
   conf and gperf conf parameters

[tomegun: tweak the 'kind' checking for received ifindex]
2014-07-03 11:00:02 +02:00
Tom Gundersen
0372cb2bd2 networkd: split out vlan and macvlan handling 2014-07-03 11:00:01 +02:00
Lennart Poettering
9a00f57a5b path: add new "systemd-path" utility for querying paths described in file-hierarchy(7)
This new tool is based on "sd-path", a new (so far unexported) API for
libsystemd, that can hopefully grow into a workable API covering /opt
and more one day.
2014-07-02 12:23:36 +02:00
Tom Gundersen
9e358851b4 networkd: netdev - add dummy support 2014-07-01 22:10:07 +02:00
Zbigniew Jędrzejewski-Szmek
2968644080 Move x-systemd-device.timeout handling from core to fstab-generator
Instead of adjusting job timeouts in the core, let fstab-generator
write out a dropin snippet with the appropriate JobTimeout.
x-systemd-device.timeout option is removed from Options= line
in the generated unit.

The functions to write dropins are moved from core/unit.c to
shared/dropin.c, to make them available outside of core.

generator.c is moved to libsystemd-label, because it now uses
functions defined in dropin.c, which are in libsystemd-label.
2014-06-30 18:39:45 -04:00
Lennart Poettering
d4e85aac0b pc: expose more drop-in dirs in the .pc file 2014-06-30 23:19:00 +02:00
Lennart Poettering
94655a1670 sysusers: split up default sysusers snippet
This ways, distributions have an easier way to replace the OS specific
generic groups/users while keeping systemd's own.
2014-06-29 22:27:07 +02:00
Lennart Poettering
0dc5d23c85 coredump: add simple coredump vacuuming
When disk space taken up by coredumps grows beyond a configured limit
start removing the oldest coredump of the user with the most coredumps,
until we get below the limit again.
2014-06-27 19:35:57 +02:00
Filipe Brandenburger
0c26bfc3d2 build-sys: include PolicyKit files as part of distribution
So that building from an archive works even if intltool is not present.
The README file already mentioned that intltool should only be required
when building from git.

Tested: Built it from the distribution archive on a host without intltool.
  $ ./configure --enable-polkit
  $ make
2014-06-26 01:41:05 -04:00
Michael Olbrich
3210412576 install: enable timesyncd by default
This treats it similarly to networkd, resolved and others and it matches
what 90-systemd.preset does.
2014-06-26 01:41:05 -04:00
Ronny Chevalier
843fecc076 tests: add test-compress 2014-06-25 02:04:42 +02:00
Kay Sievers
3577de7ac3 nspawn: create essential base directories at system bootup
This allows us to bootup a rootfs with a /usr directory only.
2014-06-24 15:41:03 +02:00
Ronny Chevalier
5549f483d0 build-sys: do not run coverage if build failed 2014-06-24 02:40:51 +02:00
Ronny Chevalier
e80cde5e96 tests: add test-ratelimit 2014-06-24 02:40:50 +02:00
Zbigniew Jędrzejewski-Szmek
dfdd0e0730 Add systemd-coredumpctl as an alias for coredumpctl
Should make the transition easier for exisiting users.
2014-06-22 15:30:19 -04:00
Ronny Chevalier
e6b5c5d03c tests: add test-async 2014-06-22 00:36:19 +02:00
Ronny Chevalier
6160e473fc tests: add test-capability 2014-06-22 00:36:19 +02:00
Ronny Chevalier
8e75477abd build-sys: add -pthread flag for libsystemd-shared
src/shared/async.c uses pthread so it will fail at link time if we link
only to libsystemd-shared and use async
2014-06-22 00:36:19 +02:00
Kay Sievers
aac5ad0d25 build-sys: replace nm with $(NM) 2014-06-21 16:50:11 +02:00
Kay Sievers
706b7936d0 gudev: replace regex with sym file 2014-06-21 16:25:15 +02:00
Kay Sievers
e09c69d9fd pam_systemd: replace regex with sym file 2014-06-21 15:45:49 +02:00
Kay Sievers
dfb0c6cc3b pam_systemd: rename source file to match the module 2014-06-21 15:44:14 +02:00
Filipe Brandenburger
65adc982db build-sys: check that compat-libs are enabled for "make dist"
Running "make dist" requires --enable-compat-libs since DIST_SOURCES will list
generated files such as libsystemd-daemon.c.

Tested:
  $ ./configure && make && make dist
  *** compat-libs must be enabled in order to make dist
  make: *** [dist-check-compat-libs] Error 1
2014-06-20 18:44:40 -04:00
Filipe Brandenburger
279419b379 build-sys: check that python is enabled for "make dist"
Running "make dist" requires Python support since some of the man page sources
(such as man/systemd.index.xml and man/systemd.directives.xml) are generated by
Python scripts, so break "make dist" and give an useful error message when
Python or the Python lxml module is not available.

Tested:
  $ ./configure --without-python && make && make dist
  *** python and python-lxml module must be installed and enabled in order to make dist
  make: *** [dist-check-python] Error 1
2014-06-20 18:44:40 -04:00
Filipe Brandenburger
b9d5b4c30d build-sys: configure --with-python when running distcheck
Python support is pretty much essential to create man pages, so we should make
sure that distcheck will request it during configure.

Tested: Successfully ran "make distcheck" and confirmed --with-python was
present in the ./configure run inside the unpacked distribution directory.
2014-06-20 18:44:40 -04:00
Filipe Brandenburger
49100d2abd build-sys: do not include id128-constants.h in the dist archive
File src/python-systemd/id128-constants.h is auto generated and its generation
does not require special tools, only sed.  There is no point in bundling it in
the distribution archive, so let's mark it as nodist_ to have it excluded.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=80006

Tested: Successfully ran "make dist" after ./configure --without-python.
2014-06-20 18:44:40 -04:00
Filipe Brandenburger
61b5c82d91 build-sys: add sysusers.d/systemd.conf to CLEANFILES
The sysusers.d/systemd.conf configuration file was originally introduced in
commit 1b99214789, but it was not marked for cleanup.  This caused distcheck
to complain about the file not being removed by distcleam.

Tested: Successfully ran "make distcheck" with this patchset.
2014-06-20 14:27:25 +02:00
Michael Marineau
09e00c524f test: ensure conf_files_list returns absolute paths 2014-06-20 00:10:47 -04:00
Filipe Brandenburger
228b2a1277 sd-dhcp6-client: include dhcp6-protocol.h in the list of sources
If the file is not listed, then "make dist" will not include it.

Tested: "make distcheck" works after this fix is applied.

Fixes: 139b011ab8
2014-06-20 00:25:08 +02:00
Filipe Brandenburger
ab2bc6feee sd-dhcp6-client: fix path of sd-icmp6-nd.h in Makefile.am
It was incorrectly looking for a file in src/libsystemd-network/ when the file was actually deployed to src/systemd/ instead.  This broke "make dist".

Tested: "make dist" works again after this patchset is applied.

Fixes: f20a35cc0d
2014-06-20 00:25:04 +02:00
Filipe Brandenburger
302c9d6c8b sd-dhcp6-client: remove bogus dependency on dhcp6-icmp6.h
Makefile.am had a reference to it but it none of the sources included it.

Tested: "make dist" works again after this patchset is applied.

Fixes: 2ea8857eff
2014-06-20 00:25:00 +02:00
Lennart Poettering
326bb68c40 debug-generator: add new generator
debug-generator can mask specific units if they are specified on the
kernel command line with systemd.mask=.

debug-generator can pull in debug-shell.service is systemd.debug-shell
is passed on the kernel command line.
2014-06-19 16:33:01 +02:00
Patrik Flykt
3fb2c57038 sd-dhcp6-lease: Add DHCPv6 lease handling
Create a structure describing a DHCPv6 lease. Add internal functions
for creating a new lease and accessing the server ID, preference and
IAID. Provide functions for clearing addresses and associated timers.

External users are initially given only the capabilities of
referencing and unreferencing the lease structure.
2014-06-19 15:44:44 +03:00
Patrik Flykt
2ea8857eff sd-dhcp6-client: Add DHCPv6 Solicit test case
Verify the Solicit message created by the DHCPv6 client code.

Provide local variants for detect_vm(), detect_container() and
detect_virtualization() defined in virt.h. This makes the DHCPv6
library believe it is run in a container and does not try to request
interface information from udev for the non-existing interface index
used by the test case code.
2014-06-19 15:44:44 +03:00
Patrik Flykt
f12ed3bf0b sd-dhcp6-client: Add basic DHCPv6 option handling
Add option appending and parsing. DHCPv6 options are not aligned, thus
the option handling code must be able to handle options starting at
any byte boundary.

Add a test case for the basic option handling.
2014-06-19 15:44:43 +03:00
Patrik Flykt
813e3a6ffc sd-dhcp6-client: Add basic DHCPv6 test cases
Add test cases for basic DHCPv6 client handling, e.g. setting
interface index, mac address and attaching event loop.
2014-06-19 15:44:43 +03:00
Patrik Flykt
f20a35cc0d sd-icmp6-nd: Add initial Router Advertisement test case
Feed a Router Advertisement to the code and expect proper events
each time. The sending part is ignored, as all of it is static code
in the real dhcp_network_icmp6_send_rs() function.
2014-06-19 15:44:43 +03:00
Patrik Flykt
e316912679 sd-icmp6-nd: Add Router Solicitation and Advertisement support
Provide functions to bind the ICMPv6 socket to the approriate interface
and set multicast sending and receiving according to RFC 3493, section
5.2. and RFC 3542, sections 3. and 3.3. Filter out all ICMPv6 messages
except Router Advertisements for the socket in question according to
RFC 3542, section 3.2.

Send Router Solicitations to the all routers multicast group as
described in RFC 4861, section 6. and act on the received Router
Advertisments according to section 6.3.7.

Implement a similar API for ICMPv6 handling as is done for DHCPv4 and
DHCPv6.
2014-06-19 15:44:43 +03:00
Lennart Poettering
f4bab1690e coredump: coredumpctl is so useful now, make it a first-class citizen
Drop the "systemd-" prefix, renaming it from "systemd-coredumpctl" to
"coredumpctl".
2014-06-19 13:46:01 +02:00
Lennart Poettering
8d4e028f18 coredump: include stacktrace of coredumps in the log message
elfutils' libdw is maintained, can read DWARF debug data and appears to
be the library of choice for generating backtraces today.
2014-06-19 12:38:45 +02:00
Lennart Poettering
34c10968cb coredump: optionally store coredumps on disk, not in the journal
Introduce a new configuration file /etc/systemd/coredump.conf to
configure when to place coredumps in the journal and when on disk.

Since the coredumps are quite large, default to storing them only on
disk.
2014-06-19 00:00:24 +02:00
Lennart Poettering
11bf3cced1 networkd: add address pool support
When an address is configured to be all zeroes, networkd will now
automatically find a locally unused network of the right size from a
list of pre-configured pools. Currently those pools are 10.0.0.0/8,
172.16.0.0/12, 192.168.0.0/16 and fc00::/7, i.e. the network ranges for
private networks. They are compiled in, but should be configurable
eventually.

This allows applying the same configuration to a large number of
interfaces with each time a different IP range block, and management of
these IP ranges is fully automatic.

When allocating an address range from the pool it is made sure the range
is not used otherwise.
2014-06-18 18:28:29 +02:00
Lennart Poettering
9542239eaf cryptsetup: introduce new cryptsetup-pre.traget unit so that services can make sure they are started before and stopped after any LUKS setup
https://bugzilla.redhat.com/show_bug.cgi?id=1097938
2014-06-18 00:09:46 +02:00
Ronny Chevalier
fe582db94b build-sys: add missing backslash 2014-06-17 17:29:47 -04:00
Lennart Poettering
a1259e0a14 build-sys: touch /usr on "make install"
this way, the "make install" will be detected as offline update on next
boot.
2014-06-17 03:09:27 +02:00
Lennart Poettering
1713703c96 preset: ship a minimal preset file upstream
This is useful so that distros have something to base their own policy
of. It also useful to make sure that minimal installs always get useful
configuration in place.
2014-06-17 02:43:44 +02:00
Ronny Chevalier
106ecd769d tests: add test-fdset 2014-06-16 20:38:22 +02:00
Ronny Chevalier
c182135d3a tests: add test-socket-util 2014-06-16 20:38:22 +02:00
Susant Sahani
326cb4061a networkd: introduce vxlan
This patch enables netwokd to create vxlan

Changes:
Added:
	1. File networkd networkd-vxlan.c
	2. to netdev
	    bool learning
	    struct in_addr group
	    uint64_t vxlanid;
	3. VXLAN subsection and config
	   parameters
2014-06-16 20:38:22 +02:00
Lennart Poettering
137243fd13 units: add a service to invoke ldconfig on system updates at boot 2014-06-16 12:33:22 +02:00