1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 18:27:04 +03:00
Commit Graph

19244 Commits

Author SHA1 Message Date
Tom Gundersen
a245ced0d7 networkd: fdb - fix const warning 2015-02-11 13:13:50 +01:00
Tom Gundersen
f806f64c74 networkd: don't do exit-on-idle if there is something wrong with the dbus connection
Just fall back to plain old event loop in this (highly unlikely) case.

In the glorious future when kdbus is upstream we can of course drop all this.
2015-02-11 13:13:49 +01:00
Martin Pitt
f4f01ec146 sysv-generator: Skip init scripts for existing native services
This avoids taking the SysV init script enablement state into account if we
have native units. Otherwise systemctl disable on native unit would not
be respected in the presence of an enabled SysV script.

Also, there's no need to do all the parsing and creation of service files if we
already have a native systemd unit for the processed SysV init script.
2015-02-11 13:02:01 +01:00
Lennart Poettering
f93b36affa Update TODO 2015-02-11 12:57:17 +01:00
Paul Martin
804319344b networkd DHCPv4 logging endian fix
On Tue, Feb 10, 2015 at 08:10:43PM +0100, Lennart Poettering wrote:

> Hmm, I think it would be nicer to use be32toh() here instead, since it
> ensures the macro is (to a limited degree) typesafe.
>
> Any chance you could rework that?

From: Paul Martin <paul.martin@codethink.co.uk>
Date: Wed, 11 Feb 2015 11:47:16 +0000
Subject: [PATCH] networkd dhcpv4 logging endian fix

On a big-endian host, systemd-networkd prints out IPv4 network
addresses byte reversed:

Feb 10 16:43:32 hostname systemd-networkd[151]: eth0 : DHCPv4 address 158.1.24.10/16 via 1.1.24.10

The address obtained is 10.24.1.158/16 and the route is

  10.24.0.0/16 dev eth0  src 10.24.1.187

The macro ADDRESS_FMT_VAL() unpacks a "struct in_addr" in a
little-endian specific manner.

This patch forces the passed address into host order, then unpacks it.

On an x86 later than i486, compiled with -O2, the only extra overhead
is a single bswap instruction.
2015-02-11 12:57:17 +01:00
Zbigniew Jędrzejewski-Szmek
b975b0d514 man: boilerplate unification 2015-02-10 23:24:27 -05:00
Zbigniew Jędrzejewski-Szmek
decde8cd96 man: fix reference to glob manpage 2015-02-10 23:24:27 -05:00
Zbigniew Jędrzejewski-Szmek
432d59656b man: add systemd.generator(7)
This is largely based on http://www.freedesktop.org/wiki/Software/systemd/Generators/,
and obsoletes that page. It seems that we do a much better
job of keeping man pages up-to-date compared to wiki pages.
Man pages are also easier to find for users.

https://bugs.freedesktop.org/show_bug.cgi?id=89048
2015-02-10 23:20:51 -05:00
Tom Gundersen
dafd811234 TODO 2015-02-10 22:30:50 +01:00
Tom Gundersen
5256e00e8b net: support globbing and disjunction in Match logic
Match{Name,OrginalName,Type,Driver,Path} can now take a space-separated glob of matches.
2015-02-10 22:30:35 +01:00
Tom Gundersen
ea6ec096db networkd: fdb - refactor a bit
Pass around Link objcets rather than FdbEntry objects. The link objects have an up-to-date
ifname we can use for logging. match_name sholud _never_ be used for anything except
matching. Firstly, it may be unset (usually is), and secondly it may not be up-to-date.
2015-02-10 22:30:35 +01:00
Tom Gundersen
9198e12ca3 networkd: bus - expose MatchMAC 2015-02-10 22:30:35 +01:00
Tom Gundersen
53d6837510 man: sd_bus_path_encode - fix order of arguments 2015-02-10 22:30:35 +01:00
Tom Gundersen
f6f8d466bd networkd: network-bus - use sd_bus_path_{en,de}code 2015-02-10 22:30:35 +01:00
Lennart Poettering
699eee62d1 CODING_STYLE: elaborate on O_CLOEXEC a bit 2015-02-10 21:25:38 +01:00
Cristian Rodríguez
d6d810fbf8 tree-wide: Always use recvmsg with MSG_CMSG_CLOEXEC 2015-02-10 21:20:16 +01:00
Lennart Poettering
332560792c test-lldp: fix minor OOM 2015-02-10 21:17:26 +01:00
Lennart Poettering
804138a08c test-lldp: initialize structs when we define them 2015-02-10 21:15:47 +01:00
Lennart Poettering
b762fbd128 test-lldp: use strndup() where possible 2015-02-10 21:15:21 +01:00
Philippe De Swert
2e1a569b77 libsystemd-network: Avoid potential NULL dereference in test-lldp
As a malloc0 could fail, doing a strncpy without checking could
cause issues. Adding an assert should be good enough and in line
with other similar routines in the code.

Found with Coverity Fixes: CID#1261402
2015-02-10 21:11:52 +01:00
Lennart Poettering
20760dcf5d update TODO 2015-02-10 20:46:19 +01:00
Lennart Poettering
df3efc3c90 bus-proxyd: initialize ioctl structure only once 2015-02-10 20:46:09 +01:00
Vincent Batts
a89a8031e0 .gitignore: add systemd-pull 2015-02-10 12:41:42 +01:00
Lennart Poettering
2a560338c4 journald: don't specify inline in local functions
Leave it to the compiler to figure out whether it shall inline stuff or
not.

Only place where using static inline is OK to use is in in header
files, really.
2015-02-10 12:34:11 +01:00
Lennart Poettering
5b99bc57f2 shared: untabify 2015-02-10 12:34:11 +01:00
Lennart Poettering
a9c67ea2a2 logind: tell Coverity that we knowingly ignore mkdir()'s return value 2015-02-10 12:34:11 +01:00
Lennart Poettering
df22b0bbfd update TODO 2015-02-10 12:34:11 +01:00
Hui Wang
4b9bb683ee keymap: Add microphone mute keymap for several HP laptops
On these several HP laptops, the microphone mute hotkey is "Fn+F8" and
the scancode for this hotkey is 0x81, but this scancode was mapped to
fn_esc in the HP generic keymap section. To fix this problem, we add
a machine specific keymap section to add the correct keymap rule.

BugLink: https://bugs.launchpad.net/bugs/1409721
BugLink: https://bugs.launchpad.net/bugs/1334968
Signed-off-by: Hui Wang <hui.wang@canonical.com>
2015-02-10 09:59:12 +01:00
Tom Gundersen
1c11181458 networkd: link_object_find - don't accept invalid input
Reported by Zbigniew.
2015-02-09 22:02:32 +01:00
Tom Gundersen
769b56a308 networkd: support route scopes
For now we only support the hardcoded values RT_SCOPE_{UNIVERSE,LOCAL,HOST},
and not numerical values or values from /etc/iproute2/rt_scopes.

This addresses https://bugs.freedesktop.org/show_bug.cgi?id=88508.
2015-02-09 16:53:54 +01:00
Torstein Husebø
e2acdb6b0f treewide: correct typos and use consistent "MAC" spelling 2015-02-09 14:32:49 +01:00
Tom Gundersen
c8f5edeab0 networkd: bus - switch to properly escaped object paths 2015-02-09 12:20:10 +01:00
Tom Gundersen
7f77697a17 networkd: add support for IPv6 tokens
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.
2015-02-09 12:20:10 +01:00
Tom Gundersen
d0d6a4cd70 networkd: generalize IPv4LL to LinkLocal
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.
2015-02-09 12:20:10 +01:00
Tom Gundersen
73cb1c149d sd-rtnl: fix typesystem for IFLA_AF_SPEC
Got this one wrong, it is not a union, just a nested container.
2015-02-09 12:20:10 +01:00
Daniele Medri
a1166fe970 language fallback: it_CH (Italian, Swiss) -> it_IT (Italian, Italy) 2015-02-09 07:39:24 +01:00
Tom Gundersen
3175fcdec5 networkd: add basic org.freedesktop.network1.Network interface 2015-02-08 20:15:37 +01:00
Tom Gundersen
dbffab87f1 networkd: add network_get_by_name 2015-02-08 20:15:37 +01:00
Tom Gundersen
23cb977ac3 build-sys: properly enable the networkd dbus activation 2015-02-08 20:15:37 +01:00
Tom Gundersen
c149ae08cc sd-rtnl: add support for IFLA_INET6_* 2015-02-08 20:15:37 +01:00
Tom Gundersen
4af7b60d42 sd-rtnl: extend type system to allow address-family to decide the union members
So far we only supported selecting them by sibling attributes.

(This stuff is all a bit crazy, but there seems to be no other way...)
2015-02-08 17:43:39 +01:00
Mantas Mikulėnas
02f500532e networkd: use valid bus paths
Object path components must start with [A-Za-z_] (AFAIK).
Also the value of 'p' is undefined if asprintf fails.
Compare to user_bus_path() in src/login/logind-user-dbus.c:281.
2015-02-08 16:34:27 +01:00
Tom Gundersen
b8719ebb57 sd-rtnl: don't treat 0-length messages specially
Still parse the CMSG data, and most importantly make sure we drop the message when peeking.
2015-02-08 16:34:27 +01:00
Umut Tezduyar Lindskog
b99802f769 sysctl: consider --prefix while parsing the files
not while applying the parsed sysctl values. Otherwise
info "Overwriting earlier assignment of %s in file %s" is
visible many times even though the given --prefix doesn't
try to set the overridden value.

This also optimizes the startup tiny bit since we have udev
rules running on network devices and setting sysctl through
the rules.
2015-02-07 12:19:37 -05:00
Piotr Drąg
2a7e23fbba Add Silesian and Kashubian to language fallback map
Silesian and Kashubian speakers would prefer to fall back to Polish (pl)
translations instead of English (C).

https://bugs.freedesktop.org/show_bug.cgi?id=89021
2015-02-07 11:55:48 -05:00
Lukasz Skalski
cfcc160f22 bus-proxyd: fix 'ListQueuedOwners' call
Set proper kdbus_cmd_list object size, otherwise:

dbus-send --system --dest=org.freedesktop.DBus --type=method_call \
print-reply / org.freedesktop.DBus.ListQueuedOwners string:org.freedesktop.systemd1

Error org.freedesktop.DBus.Error.InvalidArgs: Invalid argument
2015-02-07 10:27:45 +01:00
Zbigniew Jędrzejewski-Szmek
4e829d218c localed: add LANGUAGE= fallback when LANG= is specified
For the entries listed in the first column of language-fallback-map,
the entry from the second column will be used for LANGUAGE=, if
LANGUAGE= is not explicitly specified.

https://bugzilla.redhat.com/show_bug.cgi?id=624158
2015-02-06 09:13:12 -05:00
Naveen Kumar
757b23a6cd Add language fallback map
This map will be used to provide a fallback for translations.
For example, a Niederdeutsch (nds) speaker prefers to fall back to
German (de) translations rather then the English (C) ones.

https://bugzilla.redhat.com/show_bug.cgi?id=624158#c9
2015-02-06 09:13:12 -05:00
Zbigniew Jędrzejewski-Szmek
a08d90d6b3 build-sys: remove reference to long gone file
Interesting that automake doesn't complain about this at all.
That file was removed in 3fb97a58fa.
2015-02-06 09:13:12 -05:00
Tom Gundersen
30ae637af3 units: networkd - fix busname to work on kdbus 2015-02-06 12:12:13 +01:00