1
0
mirror of https://github.com/systemd/systemd synced 2026-04-10 09:04:50 +02:00

Compare commits

..

5 Commits

Author SHA1 Message Date
Yu Watanabe
733caba389
Merge pull request #21672 from yuwata/network-old-kernel-support
network: old kernel support
2021-12-08 10:11:20 +09:00
Zbigniew Jędrzejewski-Szmek
e7bd34cd64 meson: drop libgcrypt dep from resolved tests
Follow-up for pull request #21170.

I hoped that we would drop libgcrypt fully and drop all references to the
library in meson, but this doesn't seem feasible (because of the use in
sd-journal). But let's remove it here, all the resolved code has been switched
to work either of the two libraries.
2021-12-08 01:00:56 +00:00
Yu Watanabe
990d0aa980 dhcp: fix assertion failure
Fixes #21671.
2021-12-08 08:52:33 +09:00
Yu Watanabe
8ed68422e1 network: address: read flags from message header when IFA_FLAGS is not supported by kernel
Follow-up for 0828a38605975b68c14c9194a1ee2c5c2ff7038f.

Fixes #21670.
2021-12-08 05:40:09 +09:00
Yu Watanabe
f14a6e7f48 network: route: tighten variable scope
Follow-up for 5e82a6137546d3a2ac403df261732076130356a8.
2021-12-08 05:39:31 +09:00
4 changed files with 11 additions and 9 deletions

View File

@ -775,7 +775,7 @@ int dhcp_lease_parse_options(uint8_t code, uint8_t len, const void *option, void
} }
if (!timezone_is_valid(tz, LOG_DEBUG)) { if (!timezone_is_valid(tz, LOG_DEBUG)) {
log_debug_errno(r, "Timezone is not valid, ignoring: %m"); log_debug("Timezone is not valid, ignoring.");
return 0; return 0;
} }

View File

@ -1314,6 +1314,14 @@ int manager_rtnl_process_address(sd_netlink *rtnl, sd_netlink_message *message,
} }
r = sd_netlink_message_read_u32(message, IFA_FLAGS, &tmp->flags); r = sd_netlink_message_read_u32(message, IFA_FLAGS, &tmp->flags);
if (r == -ENODATA) {
unsigned char flags;
/* For old kernels. */
r = sd_rtnl_message_addr_get_flags(message, &flags);
if (r >= 0)
tmp->flags = flags;
}
if (r < 0) { if (r < 0) {
log_link_warning_errno(link, r, "rtnl: received address message without flags, ignoring: %m"); log_link_warning_errno(link, r, "rtnl: received address message without flags, ignoring: %m");
return 0; return 0;

View File

@ -1646,7 +1646,6 @@ int manager_rtnl_process_route(sd_netlink *rtnl, sd_netlink_message *message, Ma
Link *link = NULL; Link *link = NULL;
uint32_t ifindex; uint32_t ifindex;
uint16_t type; uint16_t type;
unsigned char table;
size_t rta_len; size_t rta_len;
int r; int r;
@ -1785,6 +1784,8 @@ int manager_rtnl_process_route(sd_netlink *rtnl, sd_netlink_message *message, Ma
r = sd_netlink_message_read_u32(message, RTA_TABLE, &tmp->table); r = sd_netlink_message_read_u32(message, RTA_TABLE, &tmp->table);
if (r == -ENODATA) { if (r == -ENODATA) {
unsigned char table;
r = sd_rtnl_message_route_get_table(message, &table); r = sd_rtnl_message_route_get_table(message, &table);
if (r >= 0) if (r >= 0)
tmp->table = table; tmp->table = table;

View File

@ -177,7 +177,6 @@ tests += [
[libsystemd_resolve_core, [libsystemd_resolve_core,
libshared], libshared],
[lib_openssl_or_gcrypt, [lib_openssl_or_gcrypt,
libgcrypt,
libgpg_error, libgpg_error,
libm]], libm]],
@ -185,7 +184,6 @@ tests += [
[libsystemd_resolve_core, [libsystemd_resolve_core,
libshared], libshared],
[lib_openssl_or_gcrypt, [lib_openssl_or_gcrypt,
libgcrypt,
libgpg_error, libgpg_error,
libm]], libm]],
@ -195,7 +193,6 @@ tests += [
[libsystemd_resolve_core, [libsystemd_resolve_core,
libshared], libshared],
[lib_openssl_or_gcrypt, [lib_openssl_or_gcrypt,
libgcrypt,
libgpg_error, libgpg_error,
libm]], libm]],
@ -203,7 +200,6 @@ tests += [
[libsystemd_resolve_core, [libsystemd_resolve_core,
libshared], libshared],
[lib_openssl_or_gcrypt, [lib_openssl_or_gcrypt,
libgcrypt,
libgpg_error, libgpg_error,
libm]], libm]],
@ -211,7 +207,6 @@ tests += [
[libsystemd_resolve_core, [libsystemd_resolve_core,
libshared], libshared],
[lib_openssl_or_gcrypt, [lib_openssl_or_gcrypt,
libgcrypt,
libgpg_error, libgpg_error,
libm], libm],
[], 'HAVE_OPENSSL_OR_GCRYPT'], [], 'HAVE_OPENSSL_OR_GCRYPT'],
@ -220,7 +215,6 @@ tests += [
[libsystemd_resolve_core, [libsystemd_resolve_core,
libshared], libshared],
[lib_openssl_or_gcrypt, [lib_openssl_or_gcrypt,
libgcrypt,
libgpg_error, libgpg_error,
libm], libm],
[], '', 'manual'], [], '', 'manual'],
@ -231,7 +225,6 @@ fuzzers += [
[libsystemd_resolve_core, [libsystemd_resolve_core,
libshared], libshared],
[lib_openssl_or_gcrypt, [lib_openssl_or_gcrypt,
libgcrypt,
libgpg_error, libgpg_error,
libm]], libm]],
] ]