diff --git a/common/src/main/java/io/netty/util/NetUtil.java b/common/src/main/java/io/netty/util/NetUtil.java index 307c5a3196..295aa0d2d7 100644 --- a/common/src/main/java/io/netty/util/NetUtil.java +++ b/common/src/main/java/io/netty/util/NetUtil.java @@ -238,6 +238,11 @@ public final class NetUtil { ipAddressString = ipAddressString.substring(1, ipAddressString.length() - 1); } + int percentPos = ipAddressString.indexOf('%'); + if (percentPos >= 0) { + ipAddressString = ipAddressString.substring(0, percentPos); + } + StringTokenizer tokenizer = new StringTokenizer(ipAddressString, ":.", true); ArrayList hexStrings = new ArrayList(); ArrayList decStrings = new ArrayList();