tcp: avoid fr segments less than mss if possible
[vpp.git] / src / vnet / ip-neighbor / ip4_neighbor.c
index 2d4b295..61b9e76 100644 (file)
@@ -187,12 +187,16 @@ ip4_arp_inline (vlib_main_t * vm,
              /* resolve the packet's destination */
              ip4_header_t *ip0 = vlib_buffer_get_current (p0);
              resolve0 = ip0->dst_address;
-             src0 = adj0->sub_type.glean.rx_pfx.fp_addr.ip4;
            }
+         else
+           /* resolve the incomplete adj */
+           resolve0 = adj0->sub_type.nbr.next_hop.ip4;
+
+         if (is_glean && adj0->sub_type.glean.rx_pfx.fp_len)
+           /* the glean is for a connected, local prefix */
+           src0 = adj0->sub_type.glean.rx_pfx.fp_addr.ip4;
          else
            {
-             /* resolve the incomplete adj */
-             resolve0 = adj0->sub_type.nbr.next_hop.ip4;
              /* Src IP address in ARP header. */
              if (!fib_sas4_get (sw_if_index0, &resolve0, &src0) &&
                  !ip4_sas_by_sw_if_index (sw_if_index0, &resolve0, &src0))
@@ -270,7 +274,6 @@ VLIB_NODE_FN (ip4_glean_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
   return (ip4_arp_inline (vm, node, frame, 1));
 }
 
-/* *INDENT-OFF* */
 VLIB_REGISTER_NODE (ip4_arp_node) =
 {
   .name = "ip4-arp",
@@ -296,7 +299,6 @@ VLIB_REGISTER_NODE (ip4_glean_node) =
     [IP4_ARP_NEXT_DROP] = "ip4-drop",
   },
 };
-/* *INDENT-ON* */
 
 #define foreach_notrace_ip4_arp_error           \
 _(THROTTLED)                                    \