From 34850e01876005422ba9523df5ae0400964e1c91 Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Fri, 1 Sep 2023 14:15:39 +0200 Subject: npt66: checksum applied to src address instead of dst address on rx Applied the checksum delta to the source address instead of the destination address in the RX direction. Cleaned up tests a little. Type: fix Change-Id: I871f3448365587e5319dfbca6ea356935321ff9b Signed-off-by: Ole Troan --- src/plugins/npt66/npt66_node.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/plugins/npt66') diff --git a/src/plugins/npt66/npt66_node.c b/src/plugins/npt66/npt66_node.c index 95fe8594dbb..21dddee3951 100644 --- a/src/plugins/npt66/npt66_node.c +++ b/src/plugins/npt66/npt66_node.c @@ -121,7 +121,6 @@ static int npt66_translate (ip6_header_t *ip, npt66_binding_t *binding, int dir) { int rv = 0; - clib_warning ("npt66_translate: before: %U", format_ip6_header, ip, 40); if (dir == VLIB_TX) { if (!ip6_prefix_cmp (ip->src_address, binding->internal, @@ -147,9 +146,8 @@ npt66_translate (ip6_header_t *ip, npt66_binding_t *binding, int dir) ip->dst_address = ip6_prefix_copy (ip->dst_address, binding->internal, binding->internal_plen); rv = npt66_adjust_checksum (binding->internal_plen, true, binding->delta, - &ip->src_address); + &ip->dst_address); } - clib_warning ("npt66_translate: after: %U", format_ip6_header, ip, 40); done: return rv; } -- cgit 1.2.3-korg