diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/nat/nat44-ed/nat44_ed.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/nat/nat44-ed/nat44_ed.c b/src/plugins/nat/nat44-ed/nat44_ed.c index dc784d9ee92..6a0b962de6e 100644 --- a/src/plugins/nat/nat44-ed/nat44_ed.c +++ b/src/plugins/nat/nat44-ed/nat44_ed.c @@ -3330,7 +3330,9 @@ nat_6t_flow_ip4_translate (snat_main_t *sm, vlib_buffer_t *b, ip4_header_t *ip, ip_csum_t ip_sum = ip->checksum; ip_sum = ip_csum_sub_even (ip_sum, f->l3_csum_delta); ip->checksum = ip_csum_fold (ip_sum); - ASSERT (ip->checksum == ip4_header_checksum (ip)); + if (0xffff == ip->checksum) + ip->checksum = 0; + ASSERT (ip4_header_checksum_is_valid (ip)); } static_always_inline int |