From 6b297aa1f5cf8de294dc839edbce5470318606c8 Mon Sep 17 00:00:00 2001 From: Yoann Desmouceaux Date: Wed, 20 Sep 2017 10:34:22 +0200 Subject: TCP: fix "tcp src-address" command with IPv6 When given a single IPv6 address, the "tcp src-address" command incorrectly infers the end of the range by copying sizeof(ip4_address_t) bytes from the given address. Change-Id: I100d5c6674d3a3980b8c018588988bdd32ff7269 Signed-off-by: Yoann Desmouceaux --- src/vnet/tcp/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c index f457ef7e..d43fb149 100644 --- a/src/vnet/tcp/tcp.c +++ b/src/vnet/tcp/tcp.c @@ -1657,7 +1657,7 @@ tcp_src_address (vlib_main_t * vm, v6set = 1; else if (unformat (input, "%U", unformat_ip6_address, &v6start)) { - memcpy (&v6end, &v6start, sizeof (v4start)); + memcpy (&v6end, &v6start, sizeof (v6start)); v6set = 1; } else if (unformat (input, "fib-table %d", &table_id)) -- cgit 1.2.3-korg