Commit graph

1516 commits

Author SHA1 Message Date
Susant Sahani fe8ac65b68 networkd: add support for mode
This patch adds supports networkd to configure bond mode
during creation via persistent conf. Mode can be configured
with conf param 'Mode'. A new section Bond is added to the
conf to support bond mode.

These modes can be configured now.

balance-rr
active-backup
balance-xor
broadcast
802.3ad
balance-tlb
balance-alb

Example conf file: test-bond.conf
[NetDev]
Name=bond1
Kind=bond

[Bond]
Mode=balance-xor

Test case:
1. start networkd service:

12: bond1: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc
noqueue state UNKNOWN mode DEFAULT group default
link/ether 22:89:6c:47:23:d2 brd ff:ff:ff:ff:ff:ff

2. find bond mode:

cat /proc/net/bonding/bond1
    Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
    Bonding Mode: load balancing (xor)
    Transmit Hash Policy: layer2 (0)
    MII Status: up
    MII Polling Interval (ms): 0
    Up Delay (ms): 0
    Down Delay (ms): 0

Changes:
       1. Added file networkd-bond.c
       2. Bond mode enum BondMode
       3. conf section [Bond]

[tomegun: whitespace]
2014-07-07 21:52:01 +02:00
Lennart Poettering e26807239b firstboot: get rid of firstboot generator again, introduce ConditionFirstBoot= instead
As Zbigniew pointed out a new ConditionFirstBoot= appears like the nicer
way to hook in systemd-firstboot.service on first boots (those with /etc
unpopulated), so let's do this, and get rid of the generator again.
2014-07-07 21:05:09 +02:00
Lennart Poettering 30f10abf42 man: document systemd-firstboot(1) 2014-07-07 18:49:17 +02:00
Lennart Poettering ed3e4a3fd9 man: drop references to the --priviliged command line option which has been removed a while back 2014-07-07 18:49:17 +02:00
Lennart Poettering ac8ddf8c96 man: chroot jails are no longer detected by ConditionVirtualization= 2014-07-07 15:25:55 +02:00
Lennart Poettering f1e4d93f57 man: add missing archs to ConditionArchitecture= description 2014-07-07 15:25:55 +02:00
Tom Gundersen 1a43ddc8b1 man: network - document Peer key 2014-07-07 14:24:07 +02:00
Lennart Poettering 108e8cd11e man: document nspawn's new --volatile switch 2014-07-04 12:56:57 +02:00
Tom Gundersen 54f601debc man: netdev - mention tun and tap
Reported by Moviuro <moviuro@gmail.com>
2014-07-04 01:26:58 +02:00
Zbigniew Jędrzejewski-Szmek 9c5dcb68b0 man: add link to Open Group Base Specifications 2014-07-03 16:41:52 -04:00
Lennart Poettering db6d9e8640 man: document that systemctl's -H may now be used to connect directly to a container on a remote host 2014-07-03 20:37:10 +02:00
Lennart Poettering a12b0cc34d sysusers: add new line type "m" to add users as members to groups 2014-07-03 19:54:46 +02:00
Lennart Poettering ab016c45a9 man: reference RestartForceExitStatus= from the Restart= description 2014-07-03 15:37:46 +02:00
Lennart Poettering 37520c1bec core: introduce new RestartForceExitStatus= service setting
This does the inverse of RestartPreventExitStatus=: it forces a restart
of a service when a certain exit status is returned by a service
process.
2014-07-03 12:51:07 +02:00
Tom Gundersen ffd488e272 networkd: tuntap - default to no packet information
Susant says:
> ip tuntap turns this off by default.

Let's follow ip(8) here as that should be the least surprising.
2014-07-03 12:19:26 +02:00
Tom Gundersen 72d33d99c5 networkd: tuntap - manpage fixes 2014-07-03 11:37:54 +02:00
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
Lennart Poettering 8f6e22a1ca man: /usr/bin may contain binaries in any compatible arch, not just the primary one 2014-07-03 01:10:01 +02:00
Lennart Poettering 4ee4264c3b man: fix links to systemd-efi-boot-generator(8) 2014-07-03 01:09:35 +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
Eugene Yakubovich 4cc7a82c94 networkd: send hostname to dhcp server
Send hostname (option 12) in DISCOVER and REQUEST messages so the
DHCP server could use it to register with dynamic DNS and such.

To opt-out of this behaviour set SendHostname to false in [DHCP]
section of .network file

[tomegun: rebased, made sure a failing set_hostname is a noop and moved
          config from DHCPv4 to DHCP]
2014-07-01 22:02:25 +02:00
Tom Gundersen 0a8a0fad01 man: bring systemd.network(5) up-to-date
Based on diff by 'poma'.
2014-07-01 21:49:53 +02:00
Tom Gundersen b35a290960 man: bring systemd.netdev(5) up-to-date
Based on a diff by the mysterious 'poma'.
2014-07-01 21:49:53 +02:00
Thomas Hindoe Paaboel Andersen ce1dde29b9 typo fixes 2014-07-01 21:12:05 +02:00
Kay Sievers eafbd4d7ce man: file-hierarchy - emphasize /usr/lib/$arch-id instead of $libdir 2014-07-01 17:47:38 +02:00
Christian Hesse 02ea24ca2a man/sd_journal_get_data: fix variable naming in example 2014-07-01 16:38:40 +02:00
Christian Hesse 8959ae0d4c man/sd_journal_next: fix argument in example
The example does not compile, it fails with:

error: passing argument 3 of ‘sd_journal_get_data’ from incompatible
pointer type

Cast to (const void **) to avoid this.
2014-07-01 16:38:37 +02:00
Lennart Poettering 959ddb4700 man: document directories in $HOME, too, in file-hierarchy(7) 2014-07-01 13:51:36 +02:00
Lennart Poettering cdf0c7abf8 man: document ConditionNeedsUpdate= 2014-07-01 01:33:56 +02:00
Lennart Poettering 82a30aae48 man: extend a bit what to expect from the various places apps can store data 2014-07-01 01:14:22 +02:00
Lennart Poettering c65b503d01 man: add sections about file node types and write access to file-hierarchy(7) 2014-07-01 01:14:22 +02:00
Zbigniew Jędrzejewski-Szmek ee43f49b78 man: mention x-initrd.mount option in fstab options list 2014-06-30 18:41:17 -04:00
Zbigniew Jędrzejewski-Szmek 63b03c0b28 man: mention that x-systemd.device-timeout is only for fstab
Reformat fstab options description. Now they are easier to read and
show up in systemd.directives(7).

Use a single sublist for both /etc/fstab and /etc/crypttab options.
Many of them can be used in both places. crypttab(5) is updated to use
the same docbook elements, so formatting is uniform.
2014-06-30 18:41:17 -04:00
Zbigniew Jędrzejewski-Szmek a17f2dc15b man: beef up systemd-fsck description 2014-06-30 18:41:17 -04:00
Lennart Poettering 6e81b5b9dc man: reference $TMPDIR, not $TMP in file-hierarchy(7)
This what environ(7) and POSIX define, so that's what we should
reference.
2014-07-01 00:29:38 +02:00
Lennart Poettering 7caa86ac4d man: document systemd-update-done.service 2014-07-01 00:16:48 +02:00
Tom Gundersen dc7f577501 man: file-hierarchy - minor fixes
Leave non-specified top-level dirs out of the spec, and minor cleanups.
2014-07-01 00:06:16 +02:00
Lennart Poettering cd48031bcf man: document how to query $libdir for the primary architecture using pkg-config 2014-06-30 23:30:00 +02:00
Thomas Hindoe Paaboel Andersen fcba63a846 man: file-hierarchy - typo fixes 2014-06-30 22:54:21 +02:00
Lennart Poettering 2f3d398a05 man: deemphesize Fedora-specific "lib64", only mention the more generic $libdir 2014-06-30 22:49:10 +02:00
Thomas Hindoe Paaboel Andersen 908c32e0f3 man: daemon - typo fix 2014-06-30 22:38:17 +02:00
Lennart Poettering 9fc25924be man: a couple of additions to file-hierarchy(7) 2014-06-30 19:52:44 +02:00
Lennart Poettering 8c63bf4ab0 man: drop references to manual StandardError=syslog from daemon(7), we do this implicitly since ages 2014-06-30 19:06:11 +02:00
Lennart Poettering 9546c6ed67 man: add a minimized, modernized description of the file system hierarchy systemd suggests 2014-06-30 19:05:17 +02:00
Lennart Poettering 21236ab510 man: document the sysusers tool 2014-06-29 22:27:07 +02:00
Eugene Yakubovich e1ea665eda Add support for DHCP static route options
This adds support for DHCP options 33 and 121: Static Route and
Classless Static Route. To enable this feature, set UseRoutes=true
in .network file. Returned routes are added to the routing table.
2014-06-29 15:18:21 +02:00
Tom Gundersen ed942a9eb2 networkd: merge DHCPv4 and DHCPv6 config
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.
2014-06-29 15:18:21 +02:00
Jan Engelhardt 45df8656eb doc: typographical improvements and choice of words 2014-06-28 00:06:31 -04:00
Jan Engelhardt 8d0e0ddda6 doc: grammatical corrections 2014-06-28 00:06:30 -04:00