]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agoMerge pull request #11887 from evverx/fuzzbuzz
Lennart Poettering [Wed, 8 May 2019 10:40:03 +0000 (12:40 +0200)] 
Merge pull request #11887 from evverx/fuzzbuzz

tests: hook up fuzz targets to FuzzBuzz

4 years agoMerge pull request #12489 from ssahani/vxlan
Zbigniew Jędrzejewski-Szmek [Wed, 8 May 2019 10:02:54 +0000 (12:02 +0200)] 
Merge pull request #12489 from ssahani/vxlan

networkd: VXLAN rename Id to VNI

4 years agoMerge pull request #12507 from poettering/random-fixlets
Zbigniew Jędrzejewski-Szmek [Wed, 8 May 2019 10:02:02 +0000 (12:02 +0200)] 
Merge pull request #12507 from poettering/random-fixlets

three minor fixes to random-util.c

4 years agonetworkd: bridge fdb add support to configure VXLAN VNI
Susant Sahani [Mon, 6 May 2019 14:28:52 +0000 (19:58 +0530)] 
networkd: bridge fdb add support to configure VXLAN VNI

4 years agofuzz: fix spelling of MACsec and MACAddress in the corpus 12489/head
Zbigniew Jędrzejewski-Szmek [Tue, 7 May 2019 18:33:38 +0000 (20:33 +0200)] 
fuzz: fix spelling of MACsec and MACAddress in the corpus

4 years agocheck-directives: use diff to show what the differences really are
Zbigniew Jędrzejewski-Szmek [Tue, 7 May 2019 18:31:32 +0000 (20:31 +0200)] 
check-directives: use diff to show what the differences really are

This also makes the comparison more detailed, since we check spelling,
including case.

4 years agonetworkd: VXLAN use correct type for VNI
Susant Sahani [Tue, 7 May 2019 09:15:30 +0000 (14:45 +0530)] 
networkd: VXLAN use correct type for VNI

4 years agonetworkd: VXLAN add support to configure Generic Protocol Extension
Susant Sahani [Mon, 6 May 2019 19:10:57 +0000 (00:40 +0530)] 
networkd: VXLAN add support to configure Generic Protocol Extension

See https://tools.ietf.org/html/draft-ietf-nvo3-vxlan-gpe-07

4 years agoMerge pull request #12501 from keszybz/silence-strncpy-warnings
Lennart Poettering [Tue, 7 May 2019 23:39:32 +0000 (01:39 +0200)] 
Merge pull request #12501 from keszybz/silence-strncpy-warnings

Silence strncpy warnings

4 years agorandom-util: rename "err" to "success" 12507/head
Lennart Poettering [Tue, 7 May 2019 22:51:26 +0000 (18:51 -0400)] 
random-util: rename "err" to "success"

After all rdrand returns 1 on success, and 0 on failure, hence let's
name this accordingly.

4 years agotravis: make sure that the fuzz targets can be built on OSS-Fuzz 11887/head
Evgeny Vereshchagin [Sun, 5 May 2019 22:15:28 +0000 (22:15 +0000)] 
travis: make sure that the fuzz targets can be built on OSS-Fuzz

4 years agotravis: make sure the fuzz targets can be built on FuzzBuzz
Evgeny Vereshchagin [Sun, 5 May 2019 20:00:38 +0000 (20:00 +0000)] 
travis: make sure the fuzz targets can be built on FuzzBuzz

4 years agotests: hook up fuzz targets to FuzzBuzz
Evgeny Vereshchagin [Sun, 5 May 2019 19:28:42 +0000 (19:28 +0000)] 
tests: hook up fuzz targets to FuzzBuzz

4 years agorandom-util: hash AT_RANDOM getauxval() value before using it
Lennart Poettering [Tue, 7 May 2019 21:26:55 +0000 (17:26 -0400)] 
random-util: hash AT_RANDOM getauxval() value before using it

Let's be a bit paranoid and hash the 16 bytes we get from getauxval()
before using them. AFter all they might be used by other stuff too (in
particular ASLR), and we probably shouldn't end up leaking that seed
though our crappy pseudo-random numbers.

4 years agorandom-util: use gcc's bit_RDRND definition if it exists
Lennart Poettering [Tue, 7 May 2019 20:21:44 +0000 (16:21 -0400)] 
random-util: use gcc's bit_RDRND definition if it exists

4 years agorandom-util: rename RANDOM_DONT_DRAIN → RANDOM_MAY_FAIL
Lennart Poettering [Tue, 7 May 2019 20:18:13 +0000 (16:18 -0400)] 
random-util: rename RANDOM_DONT_DRAIN → RANDOM_MAY_FAIL

The old flag name was a bit of a misnomer, as /dev/urandom cannot be
"drained". Once it's initialized it's initialized and then is good
forever. (Only /dev/random has a concept of 'draining', but we never use
that, as it's an obsolete interface).

The flag is still useful though, since it allows us to suppress accesses
to the random pool while it is not initialized, as that trips up the
kernel and it logs about any such attempts, which we really don't want.

4 years agoscsi_serial: replace some crazy strncpy() calls by strnlen() 12501/head
Zbigniew Jędrzejewski-Szmek [Tue, 7 May 2019 13:58:29 +0000 (15:58 +0200)] 
scsi_serial: replace some crazy strncpy() calls by strnlen()

gcc was warning about strncpy() leaving an unterminated string.
In this case, it was correct.

The code was doing strncpy()+strncat()+strlen() essentially to determine
if the strings have expected length. If the length was correct, a buffer
overread was performed (or at least some garbage bytes were used from the
uninitialized part of the buffer). Let's do the length check first and then
only copy stuff if everything agrees.

For some reason the function was called "prepend", when it obviously does
an "append".

4 years agoshared/utmp-wtmp: silence gcc warning about strncpy truncation
Zbigniew Jędrzejewski-Szmek [Tue, 7 May 2019 13:10:58 +0000 (15:10 +0200)] 
shared/utmp-wtmp: silence gcc warning about strncpy truncation

Unfortunately the warning must be known, or otherwise the pragma generates a
warning or an error. So let's do a meson check for it.

Is it worth doing this to silence the warning? I think so, because apparently
the warning was already emitted by gcc-8.1, and with the recent push in gcc to
catch more such cases, we'll most likely only get more of those.

4 years agonetworkd: VXLan TTL must be <= 255
Susant Sahani [Mon, 6 May 2019 17:37:32 +0000 (23:07 +0530)] 
networkd: VXLan TTL must be <= 255

Ignore when TTL > 255

4 years agonetworkd: VXLan Make group and remote variable separate
Susant Sahani [Tue, 7 May 2019 05:14:06 +0000 (10:44 +0530)] 
networkd: VXLan Make group and remote variable separate

VXLAN Document Group=

4 years agoMerge pull request #12475 from yuwata/network-fix-12452
Zbigniew Jędrzejewski-Szmek [Tue, 7 May 2019 18:03:22 +0000 (20:03 +0200)] 
Merge pull request #12475 from yuwata/network-fix-12452

network: add network_ref/_unref() and make Link object take a reference of Network object

4 years agoMerge pull request #12481 from ssahani/dhcp-max-retry
Zbigniew Jędrzejewski-Szmek [Tue, 7 May 2019 17:58:40 +0000 (19:58 +0200)] 
Merge pull request #12481 from ssahani/dhcp-max-retry

networkd: Allow DHCP4 client to set the number to attempt to configure/reconfigure

4 years agonetworkd: VXLAN rename Id to VNI
Susant Sahani [Tue, 7 May 2019 05:01:22 +0000 (10:31 +0530)] 
networkd: VXLAN rename Id to VNI

It makes more sense to call VXLAN ID as

1. the VXLAN Network Identifier (VNI) (or VXLAN Segment ID)
2. test-network: rename VXLAN Id to VNI
3. fuzzer: Add VXLAN VNI directive to fuzzer

4 years agonetworkd: VXLAN ID define range in the man
Susant Sahani [Mon, 6 May 2019 11:58:48 +0000 (17:28 +0530)] 
networkd: VXLAN ID define range in the man

4 years agotest-network: add one more test for LinkLocalAddressing=fallback 12481/head
Yu Watanabe [Sun, 5 May 2019 15:42:05 +0000 (17:42 +0200)] 
test-network: add one more test for LinkLocalAddressing=fallback

4 years agonetwork: add error cause in the log
Yu Watanabe [Tue, 7 May 2019 13:54:15 +0000 (15:54 +0200)] 
network: add error cause in the log

4 years agonetworkd: Allow DHCP4 client to set the number to attempt to reconfigure.
Susant Sahani [Sat, 4 May 2019 11:40:54 +0000 (17:10 +0530)] 
networkd: Allow DHCP4 client to set the number to attempt to reconfigure.

Otherwise current value is 6 and after 6 it will give up.

4 years agonetwork: use IN_ADDR_NULL and ETHER_ADDR_NULL 12475/head
Yu Watanabe [Sat, 4 May 2019 18:14:08 +0000 (20:14 +0200)] 
network: use IN_ADDR_NULL and ETHER_ADDR_NULL

The change in manager_rtnl_process_address() may not be necessary,
but for safety, let's initialize the value.

4 years agonetwork: fix conditional jump depends on uninitialised value(s)
Yu Watanabe [Sat, 4 May 2019 18:03:44 +0000 (20:03 +0200)] 
network: fix conditional jump depends on uninitialised value(s)

When address is in IPv4, the remaining buffer in in_addr_union may
not be initialized.

Fixes the following valgrind warning:
```
==13169== Conditional jump or move depends on uninitialised value(s)
==13169==    at 0x137FF6: UnknownInlinedFun (networkd-ndisc.c:77)
==13169==    by 0x137FF6: UnknownInlinedFun (networkd-ndisc.c:580)
==13169==    by 0x137FF6: ndisc_handler.lto_priv.83 (networkd-ndisc.c:597)
==13169==    by 0x11BE23: UnknownInlinedFun (sd-ndisc.c:201)
==13169==    by 0x11BE23: ndisc_recv.lto_priv.174 (sd-ndisc.c:254)
==13169==    by 0x4AA18CF: source_dispatch (sd-event.c:2821)
==13169==    by 0x4AA1BC2: sd_event_dispatch (sd-event.c:3234)
==13169==    by 0x4AA1D88: sd_event_run (sd-event.c:3291)
==13169==    by 0x4AA1FAB: sd_event_loop (sd-event.c:3313)
==13169==    by 0x117401: UnknownInlinedFun (networkd.c:113)
==13169==    by 0x117401: main (networkd.c:120)
==13169==  Uninitialised value was created by a stack allocation
==13169==    at 0x1753C8: manager_rtnl_process_address (networkd-manager.c:479)
```

4 years agosd-radv: fix memleak
Yu Watanabe [Sat, 4 May 2019 16:08:23 +0000 (18:08 +0200)] 
sd-radv: fix memleak

Fixes one memleak found in #12452.

4 years agonetwork: fix use-after-free
Yu Watanabe [Sat, 4 May 2019 17:43:45 +0000 (19:43 +0200)] 
network: fix use-after-free

The function sd_radv_add_prefix() in dhcp6_pd_prefix_assign() may
return -EEXIST, and in that case the sd_radv_prefix object allocated
in dhcp6_pd_prefix_assign() will be freed when the function returns.
Hence, the key value in Manager::dhcp6_prefixes hashmap is lost.

4 years agonetwork: fix memleak and double free
Yu Watanabe [Sat, 4 May 2019 13:59:36 +0000 (15:59 +0200)] 
network: fix memleak and double free

Fixes the third issue in #12452.

4 years agonetwork: simplify link_free()
Yu Watanabe [Sat, 4 May 2019 13:33:17 +0000 (15:33 +0200)] 
network: simplify link_free()

4 years agonetwork: drop list fields in Network object
Yu Watanabe [Sat, 4 May 2019 11:02:18 +0000 (13:02 +0200)] 
network: drop list fields in Network object

4 years agonetworkd: manager do not unef netlink and gennetlink early
Susant Sahani [Thu, 2 May 2019 09:52:03 +0000 (15:22 +0530)] 
networkd: manager do not unef netlink and gennetlink early

Because of this the fd is getting closed and we getting errors
like
```
^Ceno1: Could not send rtnetlink message: Bad file descriptor
enp7s0f0: Could not send rtnetlink message: Bad file descriptor
enp7s0f0: Cannot delete unreachable route for DHCPv6 delegated subnet 2a0a:...:fc::/62: Bad file descriptor
Assertion '*_head == _item' failed at ../systemd/src/network/networkd-route.c:126, function route_free(). Aborting.
Aborted
```

Closes one of https://github.com/systemd/systemd/issues/12452

4 years agonetwork: make Link objects take references of Network objects
Yu Watanabe [Sat, 4 May 2019 06:05:11 +0000 (08:05 +0200)] 
network: make Link objects take references of Network objects

4 years agonetwork: introduce reference counter for Network object
Yu Watanabe [Sat, 4 May 2019 05:52:38 +0000 (07:52 +0200)] 
network: introduce reference counter for Network object

4 years agoscsi_serial: replace &foo[n] by foo+n
Zbigniew Jędrzejewski-Szmek [Tue, 7 May 2019 12:56:01 +0000 (14:56 +0200)] 
scsi_serial: replace &foo[n] by foo+n

4 years agoshared/utmp-wtmp: avoid gcc warning about strncpy truncation
Zbigniew Jędrzejewski-Szmek [Tue, 7 May 2019 12:15:46 +0000 (14:15 +0200)] 
shared/utmp-wtmp: avoid gcc warning about strncpy truncation

The fact that strncpy does the truncation is the whole point here, and gcc
shouldn't warn about this. We can avoid the warning and simplify the
whole procedure by directly copying the interesting part.

4 years agonetwork: remove redunant link name in message
Zbigniew Jędrzejewski-Szmek [Tue, 7 May 2019 11:46:55 +0000 (13:46 +0200)] 
network: remove redunant link name in message

Fixes #12454.

gcc was complaining that the link->ifname argument is NULL. Adding
assert(link->ifname) right before the call has no effect. It seems that
gcc is confused by the fact that log_link_warning_errno() internally
calls log_object(), with link->ifname passed as the object. log_object()
is also a macro and is does a check whether the passed object is NULL.
So we have a check if something is NULL right next an unconditional use
of it where it cannot be NULL. I think it's a bug in gcc.

Anyway, we don't need to use link->ifname here. log_object() already prepends
the object name to the message.

4 years agoItalian translations: minor updates (#12494)
Daniele Medri [Tue, 7 May 2019 10:12:46 +0000 (12:12 +0200)] 
Italian translations: minor updates (#12494)

4 years agoMerge pull request #12478 from yuwata/wireguard-fwmark
Yu Watanabe [Tue, 7 May 2019 03:16:34 +0000 (05:16 +0200)] 
Merge pull request #12478 from yuwata/wireguard-fwmark

network: rename WireGuard.FwMark -> FirewallMark

4 years agoMerge pull request #12487 from mschiu77/acer-series-hwdb
Yu Watanabe [Tue, 7 May 2019 02:33:49 +0000 (04:33 +0200)] 
Merge pull request #12487 from mschiu77/acer-series-hwdb

Acer series hwdb

4 years agosd-dhcp: store number of trial in sd_dhcp_client::attempt
Yu Watanabe [Sun, 5 May 2019 15:10:22 +0000 (17:10 +0200)] 
sd-dhcp: store number of trial in sd_dhcp_client::attempt

Calling 2^n as attempt is misleading.

5 years agoMerge pull request #12440 from poettering/realloc-again
Zbigniew Jędrzejewski-Szmek [Mon, 6 May 2019 15:17:22 +0000 (17:17 +0200)] 
Merge pull request #12440 from poettering/realloc-again

another shot at the malloc_usable_size() thing

5 years agobasic/mountpoint-util: whitelist 'exfat' in fstype_can_uid_gid
Mike Gilbert [Wed, 1 May 2019 18:15:44 +0000 (14:15 -0400)] 
basic/mountpoint-util: whitelist 'exfat' in fstype_can_uid_gid

5 years agonetworkd: stop clients when networkd shuts down (#12463)
Susant Sahani [Mon, 6 May 2019 14:06:50 +0000 (19:36 +0530)] 
networkd: stop clients when networkd shuts down (#12463)

We not stopping the clients when networkd stops. They
should shut down cleanly and then we need to clean the DS.

One of requirements to implement
https://github.com/systemd/systemd/issues/10820.

```
^CBus bus-api-network: changing state RUNNING → CLOSED
DHCP SERVER: UNREF
DHCP SERVER: STOPPED
DHCP CLIENT (0x60943df0): STOPPED
veth-test: DHCP lease lost
veth-test: Removing address 192.168.5.31
NDISC: Stopping IPv6 Router Solicitation client
DHCP CLIENT (0x0): FREE
==24308==
==24308== HEAP SUMMARY:
==24308==     in use at exit: 8,192 bytes in 2 blocks
==24308==   total heap usage: 4,230 allocs, 4,228 frees, 1,209,732 bytes allocated
==24308==
==24308== LEAK SUMMARY:
==24308==    definitely lost: 0 bytes in 0 blocks
==24308==    indirectly lost: 0 bytes in 0 blocks
==24308==      possibly lost: 0 bytes in 0 blocks
==24308==    still reachable: 8,192 bytes in 2 blocks
==24308==         suppressed: 0 bytes in 0 blocks
==24308== Rerun with --leak-check=full to see details of leaked memory
==24308==
==24308== For lists of detected and suppressed errors, rerun with: -s
==24308== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==24308== could not unlink /tmp/vgdb-pipe-from-vgdb-to-24308-by-sus-on-Zeus
==24308== could not unlink /tmp/vgdb-pipe-to-vgdb-from-24308-by-sus-on-Zeus
==24308== could not unlink /tmp/vgdb-pipe-shared-mem-vgdb-24308-by-sus-on-Zeus

```

5 years agohwdb: update the Chuwi HI13 pattern (#12469)
pEJipE [Mon, 6 May 2019 13:55:22 +0000 (15:55 +0200)] 
hwdb: update the Chuwi HI13 pattern (#12469)

Correct the searching pattern for Chuwi Hi13. Follow-up for
c70b51a7b98c3538aba7bbfee455b850b0aa714e.

5 years agoUpdate Brazilian Portuguese translation
Rafael Fontenelle [Sat, 4 May 2019 14:40:04 +0000 (11:40 -0300)] 
Update Brazilian Portuguese translation

5 years agoSystemd Catalog, Italian translation: minor updates (#12483)
Daniele Medri [Mon, 6 May 2019 13:27:21 +0000 (15:27 +0200)] 
Systemd Catalog, Italian translation: minor updates (#12483)

5 years agohwdb: add Medion Akoya E3222 MD62450 to 60-sensor.hwdb (#12485)
mpe85 [Mon, 6 May 2019 13:18:26 +0000 (15:18 +0200)] 
hwdb: add Medion Akoya E3222 MD62450 to 60-sensor.hwdb (#12485)

5 years agotest: return a non-zero return code when 'nobody' user doesn't exist
Frantisek Sumsal [Mon, 6 May 2019 08:48:12 +0000 (10:48 +0200)] 
test: return a non-zero return code when 'nobody' user doesn't exist

Lookup of a non-existing user using getpwnam() is not considered
an error, thus the `errno` is not set appropriately, causing
unexpected fails on systems, where 'nobody' user doesn't exist by
default

5 years agohwdb: Align airplane mode toggle key mapping for all Acer series 12487/head
Chris Chiu [Thu, 2 May 2019 10:10:22 +0000 (18:10 +0800)] 
hwdb: Align airplane mode toggle key mapping for all Acer series

Packard Bell and Gateway are different marketing names from Acer.
The same scan code E0 86 is fired for the airplane mode toggle key.
It was verified in commit d8d51328fe6db33a2d8cda06f181c55c00d09672.

Signed-off-by: Chris Chiu <chiu@endlessm.com>
5 years agoRevert "hwdb: Apply Acer mappings to all Gateway and Packard Bell models"
Chris Chiu [Thu, 2 May 2019 09:46:45 +0000 (17:46 +0800)] 
Revert "hwdb: Apply Acer mappings to all Gateway and Packard Bell models"

This reverts commit e09dba97b96f877e36cd3f1afdb321922eed064b.

It's reported that the same rules for Acer cause false match and
unexpected response from certain keys on an old PackardBell laptop.

Bug: https://github.com/systemd/systemd/issues/12178

5 years agonetwork: rename WireGuard.FwMark -> FirewallMark 12478/head
Yu Watanabe [Sat, 4 May 2019 14:21:43 +0000 (16:21 +0200)] 
network: rename WireGuard.FwMark -> FirewallMark

For the consistency with FirewallMark= in [RoutingPolicyRule] section.

5 years agoMerge pull request #12429 from ssahani/link-local-fallback
Yu Watanabe [Sat, 4 May 2019 14:52:07 +0000 (16:52 +0200)] 
Merge pull request #12429 from ssahani/link-local-fallback

networkd: Option to use LinkLocalAddressing only when DHCP fails

5 years agotest-network: add a test for LinkLocalAddressing=fallback 12429/head
Yu Watanabe [Fri, 3 May 2019 23:29:45 +0000 (01:29 +0200)] 
test-network: add a test for LinkLocalAddressing=fallback

5 years agonetwork: warn about Network.IPv4LL= is deprecated
Yu Watanabe [Sat, 4 May 2019 09:25:05 +0000 (11:25 +0200)] 
network: warn about Network.IPv4LL= is deprecated

5 years agonetwork: disable fallback IPv4ll address assignment when DHCPv4 is disabled
Yu Watanabe [Sat, 4 May 2019 09:16:12 +0000 (11:16 +0200)] 
network: disable fallback IPv4ll address assignment when DHCPv4 is disabled

5 years agonetwork: use DEFINE_STRING_TABLE_LOOKUP() macro for AddressFamilyBoolean
Yu Watanabe [Fri, 3 May 2019 04:46:07 +0000 (06:46 +0200)] 
network: use DEFINE_STRING_TABLE_LOOKUP() macro for AddressFamilyBoolean

5 years agonetwork: make link_check_ready() handle LinkLocalAddressing=fallback
Yu Watanabe [Sat, 4 May 2019 09:00:33 +0000 (11:00 +0200)] 
network: make link_check_ready() handle LinkLocalAddressing=fallback

5 years agonetwork: rewrite condition about DHCP in link_check_ready()
Yu Watanabe [Fri, 3 May 2019 23:36:51 +0000 (01:36 +0200)] 
network: rewrite condition about DHCP in link_check_ready()

5 years agonetworkd: Option to use LinkLocalAddressing only when DHCP fails
Susant Sahani [Wed, 1 May 2019 06:43:23 +0000 (12:13 +0530)] 
networkd: Option to use LinkLocalAddressing only when DHCP fails

When LinkLocalAddressing=fallback or LinkLocalAddressing=ipv4-fallback
then IPv4LL will be started only when DHCP fails.

Closes #9648.

5 years agoMerge pull request #12466 from yuwata/network-fix-issue-12452
Chris Down [Sat, 4 May 2019 03:01:28 +0000 (23:01 -0400)] 
Merge pull request #12466 from yuwata/network-fix-issue-12452

network: fix assertion when link get carrier

5 years agoMerge pull request #12441 from ssahani/bridge-fdb
Chris Down [Fri, 3 May 2019 13:50:47 +0000 (09:50 -0400)] 
Merge pull request #12441 from ssahani/bridge-fdb

networkd: add support for bridge fdb destination address.

5 years agofstab-generator: Prevent double free of reused FILE*
Wieland Hoffmann [Thu, 2 May 2019 18:10:08 +0000 (20:10 +0200)] 
fstab-generator: Prevent double free of reused FILE*

When the .automount unit file already existed for any reason in the
`normal-dir` passed to `systemd-fstab-generator`, but the normal .mount unit
file did not, `f` was closed (but _not_ set to NULL). The call to
`generator_open_unit_file(..., automount_name, &f)` then failed because the
.mount unit file already existed. Now `f` did not point to an open FILE and the
later cleanup from the `_cleanup_fclose_` attribute failed with a double free.
Reset `f` to NULL before reusing it.

5 years agotest-network: add tests for BridgeFDB.Destination= 12441/head
Yu Watanabe [Fri, 3 May 2019 04:08:55 +0000 (06:08 +0200)] 
test-network: add tests for BridgeFDB.Destination=

5 years agonetworkd: Add support to configure destination address for bridge FDB
Susant Sahani [Tue, 30 Apr 2019 09:23:39 +0000 (14:53 +0530)] 
networkd: Add support to configure destination address for bridge FDB

Closes #5145.

Example conf:
```
[Match]
Name=vxlan1309

[BridgeFDB]
MACAddress=00:00:00:00:00:00
Destination=10.0.0.2

[BridgeFDB]
MACAddress=00:00:00:00:00:00
Destination=10.0.0.4

[BridgeFDB]
MACAddress=00:00:00:00:00:00
Destination=10.0.0.5
```

5 years agonetwork: fix assertion when link get carrier 12466/head
Yu Watanabe [Thu, 2 May 2019 23:13:10 +0000 (01:13 +0200)] 
network: fix assertion when link get carrier

This fixes a bug introduced by bd08ce56156751d58584a44e766ef61340cdae2d.
When link is in LINK_STATE_INITIALIZED, `Link::network` may not be
set yet.

Fixes #12452.

5 years agotest-alloc-util: let's test a few more things around GREEDY_REALLOC() 12440/head
Lennart Poettering [Tue, 30 Apr 2019 08:17:19 +0000 (10:17 +0200)] 
test-alloc-util: let's test a few more things around GREEDY_REALLOC()

5 years agoalloc-util: reintroduce malloc_usable_size() into greedy_realloc()
Lennart Poettering [Tue, 30 Apr 2019 08:13:57 +0000 (10:13 +0200)] 
alloc-util: reintroduce malloc_usable_size() into greedy_realloc()

This is another attempt at d4b604baeadbb2498e4f2c3e260260eed210f5d6 and #12438

Instead of blindly using the extra allocated space, let's do so only
after telling libc about it, via a second realloc(). The second
realloc() should be quick, since it never has to copy memory around.

5 years agoudev/cdrom_id: drop unneeded parentheses
Zbigniew Jędrzejewski-Szmek [Tue, 30 Apr 2019 06:37:07 +0000 (08:37 +0200)] 
udev/cdrom_id: drop unneeded parentheses

5 years agoMerge pull request #12218 from keszybz/use-libmount-more
Lennart Poettering [Tue, 30 Apr 2019 17:44:17 +0000 (19:44 +0200)] 
Merge pull request #12218 from keszybz/use-libmount-more

Use libmount more

5 years agomeson: make source files including nspawn-settings.h depend on libseccomp
Franck Bui [Tue, 30 Apr 2019 14:10:13 +0000 (16:10 +0200)] 
meson: make source files including nspawn-settings.h depend on libseccomp

Since nspawn-settings.h includes seccomp.h, any file that includes
nspawn-settings.h should depend on libseccomp so the correct header path where
seccomp.h lives is added to the header search paths.

It's especially important for distros such as openSUSE where seccomp.h is not
shipped in /usr/include but /usr/include/libseccomp.

This patch is similar to 8238423095ca54c48d9408a5da13e0325b31e6f6.

5 years agoudev: drop unnecessary brackets
Yu Watanabe [Tue, 30 Apr 2019 16:45:29 +0000 (18:45 +0200)] 
udev: drop unnecessary brackets

Follow-up for ed0cb346821972ec2c505ee11ed3d383aba6256e.

5 years agoMerge pull request #12420 from mrc0mmand/coccinelle-tweaks
Lennart Poettering [Tue, 30 Apr 2019 09:37:19 +0000 (11:37 +0200)] 
Merge pull request #12420 from mrc0mmand/coccinelle-tweaks

Coccinelle improvements

5 years agoMerge pull request #12439 from poettering/simplify-umask-util
Lennart Poettering [Tue, 30 Apr 2019 09:36:55 +0000 (11:36 +0200)] 
Merge pull request #12439 from poettering/simplify-umask-util

simplify RUN_WITH_UMASK()

5 years agotests: add test for umask-util.h 12439/head
Lennart Poettering [Tue, 30 Apr 2019 07:53:09 +0000 (09:53 +0200)] 
tests: add test for umask-util.h

5 years agoumask-util: simplify RUN_WITH_UMASK()
Lennart Poettering [Tue, 30 Apr 2019 07:52:35 +0000 (09:52 +0200)] 
umask-util: simplify RUN_WITH_UMASK()

Why have a struct to store the iteration bit if we actually have plenty
place in mode_t?

5 years agococcinelle: further restrict certain transformations 12420/head
Frantisek Sumsal [Mon, 29 Apr 2019 14:12:41 +0000 (16:12 +0200)] 
coccinelle: further restrict certain transformations

Some transformations generate results we don't want to keep, so
let's disable such transformations for specific files.

Also, disable const-strlen.cocci everywhere, as the STRLEN macro has a
pretty limited scope, so the transformation generates false positives in
most cases.

5 years agococcinelle: exclude JsonVariant* from the IN_SET transformation
Frantisek Sumsal [Mon, 29 Apr 2019 11:15:27 +0000 (13:15 +0200)] 
coccinelle: exclude JsonVariant* from the IN_SET transformation

JsonVariant* doesn't work with the current IN_SET implementation, so
let's exclude it from the transformation altogether

5 years agotree-wide: code improvements suggested by Coccinelle
Frantisek Sumsal [Mon, 29 Apr 2019 16:22:22 +0000 (18:22 +0200)] 
tree-wide: code improvements suggested by Coccinelle

5 years agonetword: fdb fix coding style
Susant Sahani [Tue, 30 Apr 2019 07:36:10 +0000 (13:06 +0530)] 
netword: fdb fix coding style

5 years agoMerge pull request #12434 from poettering/rm-rf-children-take-ptr
Zbigniew Jędrzejewski-Szmek [Tue, 30 Apr 2019 06:23:13 +0000 (08:23 +0200)] 
Merge pull request #12434 from poettering/rm-rf-children-take-ptr

minor rm_rf_children() modernizations

5 years agoalloc-util: don't use malloc_usable_size() to determine allocated size
Aaron Barany [Mon, 29 Apr 2019 22:00:30 +0000 (15:00 -0700)] 
alloc-util: don't use malloc_usable_size() to determine allocated size

This reverts commit d4b604baeadbb2498e4f2c3e260260eed210f5d6.

When realloc() is called, the extra memory between the originally
requested size and the end of malloc_usable_size() isn't copied. (at
least with the version of glibc that currently ships on Arch Linux)
As a result, some elements get lost and use uninitialized memory, most
commonly 0, and can lead to crashes.

fixes #12384

5 years agoMerge pull request #12428 from jwrdegoede/hwdb-logitech-kbds
Lennart Poettering [Mon, 29 Apr 2019 19:34:42 +0000 (21:34 +0200)] 
Merge pull request #12428 from jwrdegoede/hwdb-logitech-kbds

Hwdb: Add key-mappings for various wireless Logitech keyboards

5 years agoUpdate Ukrainian translation
Yuri Chornoivan [Mon, 29 Apr 2019 16:06:16 +0000 (19:06 +0300)] 
Update Ukrainian translation

5 years agoMerge pull request #12414 from keszybz/detect-podman
Lennart Poettering [Mon, 29 Apr 2019 17:07:24 +0000 (19:07 +0200)] 
Merge pull request #12414 from keszybz/detect-podman

Detect podman as separate container type

5 years agonetworkd: Add back static routes after DHCPv4 lease expires.
Susant Sahani [Mon, 29 Apr 2019 05:02:34 +0000 (10:32 +0530)] 
networkd: Add back static routes after DHCPv4 lease expires.

1. When the DHCPv4 lease expires kernel removes the route. So add it back
when we gain lease again.

Closes https://github.com/systemd/systemd/issues/12426

2. When UseRoutes=false do not remove router

5 years agohwdb: Fix F12 mapping on the Logitech Internet Navigator 12428/head
Hans de Goede [Mon, 22 Apr 2019 07:15:40 +0000 (09:15 +0200)] 
hwdb: Fix F12 mapping on the Logitech Internet Navigator

Many Logitech keyboards have the following special functions on F9-F12:
F9: file-browser F10: document-browser F11: image-browser F12:
music-browser. These should be bound to:

 #define KEY_FILE               144     /* AL Local Machine Browser */
 #define KEY_DOCUMENTS          235
 #define KEY_IMAGES           0x1ba     /* AL Image Browser */
 #define KEY_AUDIO            0x188     /* AL Audio Browser */

This commit fixes the wrong binding of F12 to KEY_SOUND (which
translates to XF86AudioPreset) and removes the ?? comments from
both F11 and F12.

5 years agohwdb: Add key mappings for Logitech MX5500 keyboard
Hans de Goede [Sun, 28 Apr 2019 19:21:00 +0000 (21:21 +0200)] 
hwdb: Add key mappings for Logitech MX5500 keyboard

Add support for various custom key-codes emitted by the Logitech MX5500
keyboard, both when attached through its Bluetooth-receiver in USB-HID
proxy mode; and when connected as a Bluetooth device.

5 years agohwdb: Add key mappings for Logitech MX5000 keyboard
Hans de Goede [Tue, 2 Apr 2019 15:23:12 +0000 (17:23 +0200)] 
hwdb: Add key mappings for Logitech MX5000 keyboard

Add support for various custom key-codes emitted by the Logitech MX5000
keyboard, both when attached through its Bluetooth-receiver in USB-HID
proxy mode; and when connected as a Bluetooth device.

5 years agohwdb: Add key mappings for Logitech 27 MHz S520 keyboard
Hans de Goede [Fri, 5 Apr 2019 12:47:04 +0000 (14:47 +0200)] 
hwdb: Add key mappings for Logitech 27 MHz S520 keyboard

The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and
mice by there wireless-PID, rather then using the PID of the receiver
which is the same for all 27MHz Logitech devices.

This allows us to add per model keymappings for the special keys on these
keyboards. This commit adds such mappings for the S520 keyboard
(modelnumber Y-RBA97).

5 years agohwdb: Add key mappings for Logitech 27 MHz EX100 keyboard
Hans de Goede [Fri, 5 Apr 2019 14:18:03 +0000 (16:18 +0200)] 
hwdb: Add key mappings for Logitech 27 MHz EX100 keyboard

The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and
mice by there wireless-PID, rather then using the PID of the receiver
which is the same for all 27MHz Logitech devices.

This allows us to add per model keymappings for the special keys on these
keyboards. This commit adds such mappings for the EX100 keyboard
(modelnumber Y-RBH94).

5 years agohwdb: Add key mappings for Logitech 27 MHz MX3200 keyboard
Hans de Goede [Thu, 4 Apr 2019 22:40:40 +0000 (00:40 +0200)] 
hwdb: Add key mappings for Logitech 27 MHz MX3200 keyboard

The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and
mice by there wireless-PID, rather then using the PID of the receiver
which is the same for all 27MHz Logitech devices.

This allows us to add per model keymappings for the special keys on these
keyboards. This commit adds such mappings for the MX3200 keyboard
(modelnumber Y-RAV80).

5 years agohwdb: Add key mappings for Logitech 27 MHz MX3000 keyboard
Hans de Goede [Wed, 3 Apr 2019 20:52:06 +0000 (22:52 +0200)] 
hwdb: Add key mappings for Logitech 27 MHz MX3000 keyboard

The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and
mice by there wireless-PID, rather then using the PID of the receiver
which is the same for all 27MHz Logitech devices.

This allows us to add per model keymappings for the special keys on these
keyboards. This commit adds such mappings for the MX3000 keyboard
(modelnumber Y-RAM74).

5 years agohwdb: Add key mappings for Logitech 27 MHz "Cordless Rechargeable Desktop" keyboard
Hans de Goede [Fri, 29 Mar 2019 22:42:56 +0000 (23:42 +0100)] 
hwdb: Add key mappings for Logitech 27 MHz "Cordless Rechargeable Desktop" keyboard

The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and
mice by there wireless-PID, rather then using the PID of the receiver
which is the same for all 27MHz Logitech devices.

This allows us to add per model keymappings for the special keys on these
keyboards. This commit adds such mappings for the "Logitech Rechargeable
Desktop" keyboard (modelnumber Y-RK49).

5 years agohwdb: Add key mappings for Logitech 27 MHz "Cordless Access Keyboard"
Hans de Goede [Fri, 22 Mar 2019 21:10:32 +0000 (22:10 +0100)] 
hwdb: Add key mappings for Logitech 27 MHz "Cordless Access Keyboard"

The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and
mice by there wireless-PID, rather then using the PID of the receiver
which is the same for all 27MHz Logitech devices.

This allows us to add per model keymappings for the special keys on these
keyboards. This commit adds such mappings for the "Logitech Cordless
Access Keyboard" (modelnumber Y-RH35).

5 years agohwdb: Add generic key mapping for Logitech 27 MHz keyboards
Hans de Goede [Thu, 4 Apr 2019 20:39:24 +0000 (22:39 +0200)] 
hwdb: Add generic key mapping for Logitech 27 MHz keyboards

The upcoming kernel enumerates Logitech 27 MHz wireless keyboards and
mice by there wireless-PID, rather then using the PID of the receiver
which is the same for all 27MHz Logitech devices.

This will allow us to add per model keymappings for the special keys on
these keyboards, which may differ per model.

This commit adds a default / fallback mapping, assigning the most common
meaning of the custom Logitech c10XX keycodes.

5 years agounits: drop reference to sushell man page
Lennart Poettering [Mon, 29 Apr 2019 14:10:51 +0000 (16:10 +0200)] 
units: drop reference to sushell man page

sushell was a Fedoraism, and has been removed since. Hence our upstream
unit files shouldn't reference it either.