summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnita Zhang <the.anitazha@gmail.com>2019-12-09 13:33:36 -0800
committerGitHub <noreply@github.com>2019-12-09 13:33:36 -0800
commitdd1b315d22148fd82b936c25fe155684654431c9 (patch)
tree62d5d236ce170deef50643b75f00738cc9586a0e
parentfb4b0465abbd96e6d342e5606c61c919c99a82ff (diff)
parent0810e6d787bd2675630aba94a08f0da7498b3966 (diff)
downloadsystemd-dd1b315d22148fd82b936c25fe155684654431c9.tar.gz
Merge pull request #14284 from yuwata/network-fix-segfault-14283
network: fix segfault in parsing SendOption=
-rw-r--r--src/network/networkd-dhcp-common.c2
-rw-r--r--test/test-network/conf/dhcp-client-ipv4-only-ipv6-disabled.network1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c
index ea5974c32a..6465a8cfe9 100644
--- a/src/network/networkd-dhcp-common.c
+++ b/src/network/networkd-dhcp-common.c
@@ -279,7 +279,7 @@ int config_parse_dhcp_send_option(
_cleanup_(sd_dhcp_option_unrefp) sd_dhcp_option *opt = NULL, *old = NULL;
_cleanup_free_ char *word = NULL, *q = NULL;
- OrderedHashmap **options = userdata;
+ OrderedHashmap **options = data;
union in_addr_union addr;
DHCPOptionDataType type;
uint8_t u, uint8_data;
diff --git a/test/test-network/conf/dhcp-client-ipv4-only-ipv6-disabled.network b/test/test-network/conf/dhcp-client-ipv4-only-ipv6-disabled.network
index b0d0d8605e..384678cc7e 100644
--- a/test/test-network/conf/dhcp-client-ipv4-only-ipv6-disabled.network
+++ b/test/test-network/conf/dhcp-client-ipv4-only-ipv6-disabled.network
@@ -7,3 +7,4 @@ IPv6AcceptRA=false
[DHCPv4]
RoutesToDNS=yes
+SendOption=12:string:test