mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-24 03:35:38 +03:00
33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
From a644eb4472ab61cdef8405b4e42bc9892f2e9295 Mon Sep 17 00:00:00 2001
|
|
From: rouzier <rouzier@gmail.com>
|
|
Date: Sat, 4 Sep 2021 02:34:57 -0400
|
|
Subject: [PATCH] The IPv4 parser no longer accepts leading zeros (#4844)
|
|
|
|
Signed-off-by: James Rouzier <rouzier@gmail.com>
|
|
---
|
|
plugin/hosts/hostsfile_test.go | 7 ++-----
|
|
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/plugin/hosts/hostsfile_test.go b/plugin/hosts/hostsfile_test.go
|
|
index 626b8918d4..05b064eb23 100644
|
|
--- a/plugin/hosts/hostsfile_test.go
|
|
+++ b/plugin/hosts/hostsfile_test.go
|
|
@@ -45,16 +45,13 @@ var (
|
|
singlelinehosts = `127.0.0.2 odin`
|
|
ipv4hosts = `# See https://tools.ietf.org/html/rfc1123.
|
|
#
|
|
- # The literal IPv4 address parser in the net package is a relaxed
|
|
- # one. It may accept a literal IPv4 address in dotted-decimal notation
|
|
- # with leading zeros such as "001.2.003.4".
|
|
|
|
# internet address and host name
|
|
127.0.0.1 localhost # inline comment separated by tab
|
|
- 127.000.000.002 localhost # inline comment separated by space
|
|
+ 127.0.0.2 localhost # inline comment separated by space
|
|
|
|
# internet address, host name and aliases
|
|
- 127.000.000.003 localhost localhost.localdomain`
|
|
+ 127.0.0.3 localhost localhost.localdomain`
|
|
ipv6hosts = `# See https://tools.ietf.org/html/rfc5952, https://tools.ietf.org/html/rfc4007.
|
|
|
|
# internet address and host name
|