ソースを参照

fix the regexp for matching an ip address

Mr C0B 9 年 前
コミット
e5d44569fb
1 ファイル変更1 行追加1 行削除
  1. 1 1
      libnetwork/resolvconf/dns/resolvconf.go

+ 1 - 1
libnetwork/resolvconf/dns/resolvconf.go

@@ -5,7 +5,7 @@ import (
 )
 )
 
 
 // IPLocalhost is a regex patter for localhost IP address range.
 // IPLocalhost is a regex patter for localhost IP address range.
-const IPLocalhost = `((127\.([0-9]{1,3}.){2}[0-9]{1,3})|(::1))`
+const IPLocalhost = `((127\.([0-9]{1,3}\.){2}[0-9]{1,3})|(::1))`
 
 
 var localhostIPRegexp = regexp.MustCompile(IPLocalhost)
 var localhostIPRegexp = regexp.MustCompile(IPLocalhost)