1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 16:59:03 +03:00
Commit Graph

15926 Commits

Author SHA1 Message Date
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
Susant Sahani
853284abdd networkd vxlan: Pass correct type
The group argument is a union. We need to
pass the correct type
2014-07-03 11:39:12 +02:00
Tom Gundersen
72d33d99c5 networkd: tuntap - manpage fixes 2014-07-03 11:37:54 +02:00
Tom Gundersen
63dadd9075 networkd: tuntap - enable PacketInfo by default 2014-07-03 11:37:54 +02:00
Tom Gundersen
6ef892fc05 networkd: netdev - move tunnel address parsing to networkd-tunnel.c 2014-07-03 11:00:36 +02:00
Tom Gundersen
4826dd6850 networkd: tunnels - make tunnel address parsing generic
It had a bug in the typing, fix that and also make it save the address family so we
can print proper error messages.
2014-07-03 11:00:36 +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
Tom Gundersen
866ee36822 udev: net_setup_link - add a bit more logging 2014-07-03 11:00:02 +02:00
Tom Gundersen
ad0774e61e networkd: netdev - drop the link callbacks after calling them once
We should never call them again, so make sure they are cleaned up correctly.
2014-07-03 11:00:01 +02:00
Tom Gundersen
563c69c6b2 networkd: netdev - take ref immediately after calling out
Keeping the refcounting next to the sd_bus_call_async() makes it easier to check.
2014-07-03 11:00:01 +02:00
Tom Gundersen
0372cb2bd2 networkd: split out vlan and macvlan handling 2014-07-03 11:00:01 +02:00
Lennart Poettering
620a687cd2 sd-login: use the same code for verfiying machine names everywhere 2014-07-03 01:19:26 +02:00
Lennart Poettering
db9bb83fa5 bus: close a bus that failed to connect 2014-07-03 01:19:21 +02:00
Lennart Poettering
7f0d207d2c sd-bus: support connecting to remote hosts, directly into containers
systemctl -H root@foobar:waldi

will now show a list of services running on container "waldi" on host
"foobar", using "root" for authenticating at "foobar".

Since entereing a container requires priviliges, this will only work
correctly for root logins.
2014-07-03 01:17:26 +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
7bb4d371af sd-bus: when an event loop terminates, explicitly close the bus
This makes sure we actually release the bus and all the messages it
references.
2014-07-02 17:36:47 +02:00
Lennart Poettering
b5eca3a205 bus: drop bus/message GC logic
When a caller drops all references to a bus and its messages while the
messages where still queue, this causes the bus to reference the
messages, and the messages to reference the bus, without anybody else
keeping a reference, which is something we so far considered a leak, and
tried to fix with a GC logic that would recognize cases like this, and
drop the reference.

This GC logic has been broken sofar, and remained unfixed. This commit
removes it altogther, replacing it with nothing. The rationale is that
simply because all refs to the bus have been dropped its queued messages
should *still* be written to the bus, even if the caller doesn't retain
any reference to either bus nor message. This means it was actually
wrong to attempt to clean up the bus in this case.

The proper way how applications should handle this is by explicitly
invoking sd_bus_close(), when they want busses to go away. This is
probably want they want to do anyway to avoid getting spurious
callbacks after they stopped using a bus.
2014-07-02 17:29:09 +02:00
Lennart Poettering
62bb05f64f bus-proxy: restore operation in non-kdbus mode
bus-proxyd is not only the bridge between legacy dbus clients and kdbus
but is also used to access remote dbus servers via ssh. Let's make sure
it actually works for that.
2014-07-02 17:12:24 +02:00
Michal Sekletar
387066c2e5 localed: consider an unset model as a wildcard 2014-07-02 16:11:50 +02:00
Tom Gundersen
5e91345094 sd-dhcp6-client: initialize variable 2014-07-02 15:54:27 +02:00
Lennart Poettering
01d4590b77 udev: net_setup_link builtin should print the reason why something fails
Let's tell users what is going wrong.
2014-07-02 15:13:29 +02:00
Lennart Poettering
e0a33e7ba6 util: when unescaping strings, don't allow smuggling in of additional NUL bytes
Better safe than sorry.
2014-07-02 13:45:49 +02:00
Lennart Poettering
fecc80c1ba util: generalize is_localhost() and use it everywhere where applicable 2014-07-02 13:41:31 +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
Thomas Hindoe Paaboel Andersen
cd4ba18a84 coredump: vacuum - fix calculation of 10% of fs size for MaxUse 2014-07-01 23:49:56 +02:00
Thomas Hindoe Paaboel Andersen
926695f1b5 sd-dhcp6-client: check return value
Checking the return values seems to have been forgotten in
ed6ee21953
2014-07-01 23:46:51 +02:00
Filipe Brandenburger
72165d6191 networkd: fix alignment of gperf source 2014-07-01 23:44:27 +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
Tom Gundersen
8900367cd2 networkd: netdev - take ref when creating netdevs
We were doing this correctly for when the callback takes the Link object, but
must also do it for the cases it takes the NetDev object.
2014-07-01 20:33:30 +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
793c098f0a update TODO 2014-07-01 16:37:47 +02:00
Kay Sievers
f841a154ef parse_uid: return -ENXIO for -1 uids 2014-07-01 16:00:05 +02:00
Thadeu Lima de Souza Cascardo
3058e017fc Use dev_port for the ID of a network device.
For network devices on the same PCI function, dev_id should not be used,
since its purpose is for IPv6 support on interfaces with the same MAC
address.

The new dev_port sysfs attribute should be used instead of dev_id.
2014-07-01 15:19:20 +02:00
Lennart Poettering
2834ffe78d update TODO 2014-07-01 13:51:36 +02:00
Lennart Poettering
959ddb4700 man: document directories in $HOME, too, in file-hierarchy(7) 2014-07-01 13:51:36 +02:00
Tom Gundersen
856f962c7a networkd: link - don't fail if master netdev already exists
This allows restarts to work gracefully.
2014-07-01 13:30:23 +02:00
Tom Gundersen
d5b3d845f0 networkd: tunnel - ensure that enslave callback is always invoked
The Link statemachine relies on this, as it would otherwise wait forever. Hook up the tunnels in the
same way as the other NetDev's.
2014-07-01 12:55:19 +02:00
Tom Gundersen
1a941ac4b6 networkd: link - ignore missing MAC address
Currently DHCP/IPv4LL only works on ethernet devices, but no reason not to otherwise
manage them.
2014-07-01 12:55:05 +02:00
Kay Sievers
afc3f9cb24 base-filesystem: avoid all searching if the link already exists 2014-07-01 12:25:38 +02:00
Kay Sievers
3fd165e53a base-filesystem: explicitely check existence of the platform's ABI dynamic loader 2014-07-01 12:12:40 +02:00
Kay Sievers
e1ae9755ab base-filesystem: create /lib64 symlink to libdir /usr directory 2014-07-01 11:46:12 +02:00
Susant Sahani
0099bc15f1 networkd: address_acquire use cleanup macro
use cleanup macro for Address na

[tomegun: dropped unneccessary braces]
2014-07-01 10:38:07 +02:00
Susant Sahani
8469c1d329 networkd: netdev add one separate line 2014-07-01 10:35:42 +02:00