nat: use correct node indexes for queues
[vpp.git] / src / plugins / nat / nat44-ed / nat44_ed.c
index d9d35fc..6f2cd11 100644 (file)
@@ -2011,10 +2011,10 @@ nat44_set_node_indexes (snat_main_t * sm, vlib_main_t * vm)
   vlib_node_t *node;
 
   node = vlib_get_node_by_name (vm, (u8 *) "nat44-ed-out2in");
-  sm->in2out_node_index = node->index;
+  sm->out2in_node_index = node->index;
 
   node = vlib_get_node_by_name (vm, (u8 *) "nat44-ed-in2out");
-  sm->out2in_node_index = node->index;
+  sm->in2out_node_index = node->index;
 
   node = vlib_get_node_by_name (vm, (u8 *) "nat44-ed-in2out-output");
   sm->in2out_output_node_index = node->index;
@@ -3318,15 +3318,15 @@ nat_6t_l3_l4_csum_calc (nat_6t_flow_t *f)
       f->rewrite.dport = f->match.dport;
     }
   if (f->ops & NAT_FLOW_OP_ICMP_ID_REWRITE &&
-      f->rewrite.icmp_id != f->match.icmp_id)
+      f->rewrite.icmp_id != f->match.sport)
     {
       f->l4_csum_delta =
        ip_csum_add_even (f->l4_csum_delta, f->rewrite.icmp_id);
-      f->l4_csum_delta = ip_csum_sub_even (f->l4_csum_delta, f->match.icmp_id);
+      f->l4_csum_delta = ip_csum_sub_even (f->l4_csum_delta, f->match.sport);
     }
   else
     {
-      f->rewrite.icmp_id = f->match.icmp_id;
+      f->rewrite.icmp_id = f->match.sport;
     }
   if (f->ops & NAT_FLOW_OP_TXFIB_REWRITE)
     {