aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip-neighbor/ip_neighbor.c
AgeCommit message (Collapse)AuthorFilesLines
2024-03-12misc: remove GNU Indent directivesDamjan Marion1-32/+0
Type: refactor Change-Id: I5235bf3e9aff58af6ba2c14e8c6529c4fc9ec86c Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-16ip-neighbor: add ip neighbor flushOle Troan1-2/+11
Flushing the neighbor cache was only available through API. Add CLI command. Either flushes whole table (IP4,IP6) or all neighbors on specified interface. Type: improvement Change-Id: Ia8c68fb032a2dfd940a136edc2aee80db5c37685 Signed-off-by: Ole Troan <otroan@employees.org>
2023-06-29ip-neighbor: add api for getting neighbor db configAlexander Chernavin1-0/+11
There is an API call to change neighbor database configuration (i.e. limit on peer number, aging, and recycling). With this change, make getting current values of these settings available via the API. Type: improvement Change-Id: Ie9394e086b68cf9b28ad98dea162f203f8043cbb Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-05-21ip-neighbor: fix aged neighbor probeSergio Gonzalez Monroy1-2/+2
The order of the parameters when calling the ip_neighbor_probe_dst for an aged neighbor is wrong and given that it runs on the master thread, probes for IPv6 neighbors were never sent, leading to a certain neighbor strike out and death and its removal from the neighbor cache. Change-Id: Ic021bd0ece05bd2c1c6ab90eab0e2dc27cb10360 Type: fix Fixes: fd2417b2a42 Signed-off-by: Sergio Gonzalez Monroy <monroy@anapaya.net>
2022-10-16ip-neighbor: delete redundant help information in cli.Huawei LI1-12/+17
Delete redundant help information in ip neighbor's cli. There is no code implementation about fib-id and proxy in the cli's subsequent process. Type: fix Signed-off-by: Huawei LI <lihuawei_zzu@163.com> Change-Id: I1e276aad030409e3f2f62fee489ea95d316e67b5
2022-09-15ip-neighbor: fix debug log format outputluoyaozu1-4/+3
Type: fix Signed-off-by: luoyaozu <luoyaozu@foxmail.com> Change-Id: Ibfebe4da0197d1f60bf9edd3873fe1f776b680a4
2022-08-09ip-neighbor: ARP and ND stats per-interface.Neale Ranns1-9/+131
Type: feature stats of the like from: https://datatracker.ietf.org/doc/html/draft-ietf-rtgwg-arp-yang-model-03#section-4 Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Icb1bf4f6f7e6ccc2f44b0008d4774b61cae96184
2022-04-26linux-cp: sync addr and neigh only for lcp interfacesStanislav Zaikin1-1/+1
Type: fix Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com> Change-Id: I792467b73449074e59c4232b1f82d134c399624c
2021-09-13ip-neighbor: Handle local MAC address change for incomplete adjacenciesNeale Ranns1-34/+6
Type: fix When the local MAC address of an interface changes the rewrite strings of all adjacency types need to be updated - this patch fixes the missing case of incomplete adjacencies. I moved the update of all adj types into the adj module, since if the complete adjs were done by the ip-neighbour module and incomplete ones by adj module, that would mean two walks of the adj DB, as it is not possible to walk only a specific type. UT is updated to include the missing case. Signed-off-by: Neale Ranns <neale@graphiant.com> Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com> Change-Id: I36af94976c645bdd0d4d3bc0093b24d7d077e9d7
2021-02-22ip-neighbor: add set ip neighbor-config CLI commandIvan Shvedunov1-0/+54
Type: improvement Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com> Change-Id: I77ade50425e88d2da979f732d2248bed383f4ba4
2020-12-14misc: move to new pool_foreach macrosDamjan Marion1-12/+12
Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-08fib: Source Address SelectionNeale Ranns1-25/+14
Type: feature Use the FIB to provide SAS (in so far as it is today) - Use the glean adjacency as the record of the connected prefixes = there's a glean per-{interface, protocol, connected-prefix} - Keep the glean up to date with whatever the recieve host prefix is (since it can change) Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Change-Id: I0f3dd1edb1f3fc965af1c7c586709028eb9cdeac
2020-11-25ip-neighbor: Send API event when neighbor is removedNeale Ranns1-10/+14
Type: fix Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Change-Id: I9952497a108bac26445af95c28d4eed46099c2fc
2020-11-20ip-neighbor: Use ip_address_t rather than ip46_address_tNeale Ranns1-207/+223
Type: improvement Change-Id: Ica5f395075677bda5f38d28e704f65350af88610 Signed-off-by: Neale Ranns <nranns@cisco.com>
2020-07-31ip-neighbor: Allow to replace dynamic entryVladimir Isaev1-11/+13
Before this patch it was not allowed to replace a dynamic ARP entry with a static one with the same mac-address. Type: fix Signed-off-by: Vladimir Isaev <visaev@netgate.com> Change-Id: I6cfc0e510ffdf141c61874288f11a60395182374
2020-05-10ip-neighbor: fix show ip neighbor issueMichael Yu1-5/+4
Fix the issue that vppctl show ip4{6} neighbor [interface] command can't show entries correctly, example: both ip4 and ip6 entries can be shown with command: vppctl show ip4 neighbor. Type: fix Signed-off-by: Michael Yu <michael.a.yu@nokia-sbell.com> Change-Id: I229368b71cd285adce994c8290cc9d7e4c4f5aa6 Signed-off-by: Michael Yu <michael.a.yu@nokia-sbell.com>
2020-05-02ip-neighbor: honor walk callback return valueRuslan Babayev1-2/+4
Type: fix Change-Id: I5e1f7c37d612f4666edf2262b457ae0e13f20791 Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
2020-04-30ip-neighbor: Add flush APINeale Ranns1-0/+34
Type: feature Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I96509c274895b917c3e220204d7959d9270de30d
2020-04-23ip-neighbor: Replace feature for the ip-neighbor data-baseNeale Ranns1-0/+63
Type: feature DB replace is implemented with a mark and sweep algorithm (just the the FIB) Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I54ab06e11552219e2a18e1b4a87d531321cf3829
2020-02-20ip-neighbor: Fix aging timeoutVladimir Isaev1-12/+19
Before this patch VPP checked age for ARP/NDP records every 1e5 seconds for any configured aging time. This is 27 hours and it looks like misprint because 1e5 is the number of 10us ticks in a second. Also time to wait is now difference between aging time and time alive for nodes in alive state. Type: fix Signed-off-by: Vladimir Isaev <visaev@netgate.com> Change-Id: Ib5baa85032a44402d5f48c1145245260a42c7bae
2020-02-03fib: refresh adj pointer after fib_walk_sync due to possible reallocSteven Luong1-0/+7
fib_walk_sync may call adj_alloc which may cause adj_pool to expand. When that happens, any previous frame which still use the old adj pointer needs to refresh. Failure to do so may access or update to the old adj memory unintentionally and crash mysteriously. Type: fix Ticket: VPPSUPP-54 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I173dec4c5ce81c6e26c4fe011b894a7345901b24
2019-12-31ip-neighbor: set link-type ARP on incomplete adjacenciesNeale Ranns1-1/+1
Type: fix Change-Id: I05d74da311d6a86ec4eb3df50d53ecaa9c622f50 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-12-23ip-neighbor: ip_neighbor_advertise() handles nullMatthew Smith1-2/+2
Type: fix Fixes: cbe25aab3b ip_neighbor_advertise() was calling one of both of ip4_neighbor_advertise() and/or ip6_neighbor_advertise() with &addr->{ip4|ip6} as an argument. If addr is null, which is likely a requirement when the type is IP46_TYPE_BOTH, this results in a SEGV. Check addr and pass a pointer to one of it's members if it is not null, otherwise pass null. Change-Id: I6261bb8fe947365fe3d6c58788ea27d5cb28ff05 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2019-12-17ip: Protocol Independent IP NeighborsNeale Ranns1-0/+1664
Type: feature - ip-neighbour: generic neighbour handling; APIs, DBs, event handling, aging - arp: ARP protocol implementation - ip6-nd; IPv6 neighbor discovery implementation; separate ND, MLD, RA - ip6-link; manage link-local addresses - l2-arp-term; events separated from IP neighbours, since they are not the same. vnet retains just enough education to perform ND/ARP packet construction. arp and ip6-nd to be moved to plugins soon. Change-Id: I88dedd0006b299344f4c7024a0aa5baa6b9a8bbe Signed-off-by: Neale Ranns <nranns@cisco.com>