diff options
author | Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> | 2019-03-09 08:40:57 +0000 |
---|---|---|
committer | Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> | 2019-07-25 12:23:46 +0100 |
commit | e9eec39aacde450ba87598d85987b374ce6aed95 (patch) | |
tree | 3823546edc4d7228951ea9e37f55f6fea3f06833 /package/network/services/dnsmasq/patches/0041-Don-t-attempt-to-parse-a-sequence-of-hex-digits-with.patch | |
parent | 7d684b7673a7cb4f3fef366dd4f621f62fc4019c (diff) |
dnsmasq: backport latest patches
Backport upstream patches pre 2.81rc for testing purposes.
Let's see what falls out!
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Diffstat (limited to 'package/network/services/dnsmasq/patches/0041-Don-t-attempt-to-parse-a-sequence-of-hex-digits-with.patch')
-rw-r--r-- | package/network/services/dnsmasq/patches/0041-Don-t-attempt-to-parse-a-sequence-of-hex-digits-with.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/package/network/services/dnsmasq/patches/0041-Don-t-attempt-to-parse-a-sequence-of-hex-digits-with.patch b/package/network/services/dnsmasq/patches/0041-Don-t-attempt-to-parse-a-sequence-of-hex-digits-with.patch new file mode 100644 index 0000000000..2ff6f88ed0 --- /dev/null +++ b/package/network/services/dnsmasq/patches/0041-Don-t-attempt-to-parse-a-sequence-of-hex-digits-with.patch @@ -0,0 +1,42 @@ +From 6799320edb9f8465659259721e01e15f9d263aeb Mon Sep 17 00:00:00 2001 +From: Simon Kelley <simon@thekelleys.org.uk> +Date: Mon, 4 Mar 2019 22:59:42 +0000 +Subject: [PATCH 41/57] Don't attempt to parse a sequence of hex digits without + any colons as IPv6 address. + +Another confusion in the heuristic dhcp-option parsing. Sigh. + +Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> +--- + src/option.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/src/option.c ++++ b/src/option.c +@@ -1181,7 +1181,7 @@ static int parse_dhcp_opt(char *errstr, + { + /* characterise the value */ + char c; +- int found_dig = 0; ++ int found_dig = 0, found_colon = 0; + is_addr = is_addr6 = is_hex = is_dec = is_string = 1; + addrs = digs = 1; + dots = 0; +@@ -1195,6 +1195,7 @@ static int parse_dhcp_opt(char *errstr, + { + digs++; + is_dec = is_addr = 0; ++ found_colon = 1; + } + else if (c == '/') + { +@@ -1236,6 +1237,9 @@ static int parse_dhcp_opt(char *errstr, + + if (!found_dig) + is_dec = is_addr = 0; ++ ++ if (!found_colon) ++ is_addr6 = 0; + + /* We know that some options take addresses */ + if (opt_len & OT_ADDR_LIST) |