diff options
author | Neale Ranns <neale@graphiant.com> | 2023-03-08 04:53:37 +0000 |
---|---|---|
committer | Alexander Skorichenko <askorichenko@netgate.com> | 2023-11-30 16:24:53 +0100 |
commit | 6d83dddeb142b9e44bb1e0e8f266629706c4fdc3 (patch) | |
tree | 1a5d7ea54b549bc389338ebdb44850bdb7eab026 /src/vnet/ip-neighbor | |
parent | d20bacd0e5d0872eed025620a15f9dd314d6aca2 (diff) |
fib: Don't use an address from an attached prefix when sending ARP requests.
Change-Id: I4c3144794dd0bd7de6150929e53f6d305c496b17
Type: fix
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I7b0c2c2dec5e867970599b8f2f2da17f2ff0b17c
(cherry picked from commit 39528796098973fe9a5411e0f6f94268c3324e94)
Diffstat (limited to 'src/vnet/ip-neighbor')
-rw-r--r-- | src/vnet/ip-neighbor/ip4_neighbor.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vnet/ip-neighbor/ip4_neighbor.c b/src/vnet/ip-neighbor/ip4_neighbor.c index 2d4b2957ecd..8be4b824712 100644 --- a/src/vnet/ip-neighbor/ip4_neighbor.c +++ b/src/vnet/ip-neighbor/ip4_neighbor.c @@ -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)) |