From 1ae8a3cbf5f2dc674e889a6455b20090c0873d66 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Sun, 24 Oct 2021 23:39:51 -0700 Subject: [PATCH] ipv6 is 16 bytes --- protocols/shared/src/main/scala/fs2/protocols/Ip4sCodecs.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocols/shared/src/main/scala/fs2/protocols/Ip4sCodecs.scala b/protocols/shared/src/main/scala/fs2/protocols/Ip4sCodecs.scala index 0a77c36597..f527a7e4dd 100644 --- a/protocols/shared/src/main/scala/fs2/protocols/Ip4sCodecs.scala +++ b/protocols/shared/src/main/scala/fs2/protocols/Ip4sCodecs.scala @@ -31,7 +31,7 @@ object Ip4sCodecs { bytes(4).xmapc(b => Ipv4Address.fromBytes(b.toArray).get)(a => ByteVector.view(a.toBytes)) val ipv6: Codec[Ipv6Address] = - bytes(8).xmapc(b => Ipv6Address.fromBytes(b.toArray).get)(a => ByteVector.view(a.toBytes)) + bytes(16).xmapc(b => Ipv6Address.fromBytes(b.toArray).get)(a => ByteVector.view(a.toBytes)) val macAddress: Codec[MacAddress] = bytes(6).xmapc(b => MacAddress.fromBytes(b.toArray).get)(m => ByteVector.view(m.toBytes))