Make the regex for inet6Line in packetimpact/netdevs more accurate

PiperOrigin-RevId: 340763455
This commit is contained in:
Zeling Feng
2020-11-04 18:19:44 -08:00
committed by gVisor bot
parent a15562c019
commit e29972ec04
+1 -1
View File
@@ -40,7 +40,7 @@ var (
deviceLine = regexp.MustCompile(`^\s*(\d+): (\w+)`)
linkLine = regexp.MustCompile(`^\s*link/\w+ ([0-9a-fA-F:]+)`)
inetLine = regexp.MustCompile(`^\s*inet ([0-9./]+)`)
inet6Line = regexp.MustCompile(`^\s*inet6 ([0-9a-fA-Z:/]+)`)
inet6Line = regexp.MustCompile(`^\s*inet6 ([0-9a-fA-F:/]+)`)
)
// ParseDevices parses the output from `ip addr show` into a map from device