aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/linux-cp
AgeCommit message (Collapse)AuthorFilesLines
2021-11-03linux-cp: Cleanup any existing pairs when an interface is deletedNeale Ranns1-0/+17
Type: fix This only happens when the user deletes the physical before they delete the pair, that's not supoosed to be the case, but don't crash if it is. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I8c2317b360d897775dde23833d04430f88531cbd
2021-09-09linux-cp: fix non-NULL terminated stringBenoît Ganne1-1/+1
lip->lip_host_name is a non-NULL terminated vector. Type: fix Change-Id: Ic154ad7f57f0b507204e55f78995cc0e89132e57 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-09-09linux-cp: Complete interface creation logicPim van Pelt6-86/+268
Linux Control Plane interface creation logic is currently only able to create untagged interfaces, and dot1q VLAN sub-interfaces. This change makes it possible to create dot1ad VLAN sub-ints, and Q-in-AD as well as Q-in-Q sub-interfaces as well. It makes the plugin a bit more robust by catching a few common errors, such as creating an lcp on a sub-interface without its parent having one, and creating an lcp on a sub-interface that is not exact-match. This change has a bunch of smaller improvemnets as well. I documented my work in this post: https://ipng.ch/s/articles/2021/08/12/vpp-1.html It shows that after the change is merged, all VPP interface types now create and operate cleanly as LCP interfaces as well. Type: improvement Signed-off-by: Pim van Pelt <pim@ipng.nl> Change-Id: I322669f7316d44c227090b83d6a574fb9c00e76a
2021-09-08linux-cp: fix crash on failed vlib_buffer_copyPim van Pelt1-12/+24
Type: fix Signed-off-by: Pim van Pelt <pim@ipng.nl> Change-Id: I390282ecc63600728cf11413510c0169178e305c
2021-07-22vppinfra: add abstract socket & netns fnsNathan Skrzypczak1-23/+10
* Add clib_socket_init support for abstract sockets if name starts with an '@' * Add clib_socket_init_netns to open socket in netns * Add clib_netns_open Type: feature Change-Id: I89637ad657c702ec38ddecb5c03a1673d0dfb104 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-07-15linux-cp: clear all db entries when deleting a pairSergio Gonzalez Monroy1-1/+2
Type: fix Change-Id: I5677cbb183b10c974a3a2e569d1a7a525a7eb45d Signed-off-by: Sergio Gonzalez Monroy <sgmonroy@gmail.com>
2021-06-24linux-cp: stop managing adjacencies for tunnelsAlexander Chernavin1-0/+12
Type: fix Outbound packets which arrive on tun/L3 interfaces use a default adjacency for the interface & address family from the corresponding interface pair. However, there are entries in the linux-cp adj table that are created for them. Managing these entries might cause a segfault because the rewrite data might exceed the reserved space for it of 28 bytes in the linux-cp adj key (e.g. in case of GRE IPv6). With this change, stop creating adjacencies for tun/L3 interfaces in the linux-cp adj table and delegating them. Signed-off-by: Alexander Chernavin <achernavin@netgate.com> Change-Id: I4bcd685860053ab87c65064c182e3ed53fd4fae9
2021-06-24linux-cp: add callbacks for pair managementMatthew Smith2-15/+41
Type: improvement Allow callbacks to be registered which will be called when an interface pair is added or deleted. Change-Id: I1c413ac2ada802021f9e56e2f878ce67e5eda2f5 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2021-06-03linux-cp: use default adjacencyMatthew Smith1-21/+16
Type: fix Outbound packets from the host have an adjacency lookup performed so buffer metadata can be filled in and output features can be applied. If no adjacency is found for a packet, it gets dropped. This breaks DHCP and possibly other things since the DHCP reply to a discover request is sent to a destination MAC address that is determined by the contents of the request packet rather than any existing neighbor table entry. If adjacency lookup for outbound packets does not find an entry, use the default adjacency for the interface & address family. Change-Id: Ia53a4df3a5bad2991768cfe4a84c560b879e656f Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2021-05-25linux-cp: A V2 variant of pair create API that returns the hostNeale Ranns5-22/+88
interface created Type: improvement Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I31a83cd50513078895078bae3ae11372d351ddcd
2021-05-21linux-cp: Add delegate to adjacenciesMatthew Smith1-10/+74
Type: improvement When an adjacency is created, add the linux-cp delegate on the new adjacency so we can later deal with modifications & deletions in our cache of adjacency data. Add a pool of hash keys and associate the pool index for a particular key with the adj_delegate_t. If the rewrite on an adjacency is changed, this will allow us to delete the old hash table entry and it will not become orphaned. Signed-off-by: Matthew Smith <mgsmith@netgate.com> Change-Id: I072b960c02cf377d66f7d18b8c0e9e05824a0ca3
2021-05-13tests: move test source to vpp/testDave Wallace1-174/+0
- Generate copyright year and version instead of using hard-coded data Type: refactor Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I6058f5025323b3aa483f5df4a2c4371e27b5914e
2021-04-30build: declare some CMake variables as advancedDamjan Marion1-1/+1
Type: make Change-Id: I780c1c81a50cb92bc89c05856efd8ef88479c0ab Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-15tests: use socket transport instead of shared memoryOle Troan1-2/+2
Type: improvement Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I9e65c94a5a05047a5104e9361ea36eac77b40442 Signed-off-by: Ole Troan <ot@cisco.com>
2021-02-25linux-cp: fix vector-used-a-C-string overflowBenoît Ganne2-4/+3
lip_host_name is a non-NULL terminated vector, not a NULL-terminated C-string. Type: fix Change-Id: Ie5da59bc5680be72251904467d77b18263c882f8 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-02-17linux-cp: fix coverity defectMatthew Smith1-0/+6
Type: fix If no host interface name is passed to the CLI command which creates an interface pair, NULL gets passed to lcp_itf_pair_create() and a seg fault occurs. Check whether a host interface name was provided and fail gracefully if none was given. Change-Id: I82886f4c2ee710e206c751c34a74399112e9062c Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2021-02-04linux-cp: Linux Interface Mirroring for Control Plane IntegrationNeale Ranns15-0/+3555
Type: feature please see FEATURE.yaml for details. Signed-off-by: Neale Ranns <nranns@cisco.com> Signed-off-by: Matthew Smith <mgsmith@netgate.com> Signed-off-by: Jon Loeliger <jdl@netgate.com> Signed-off-by: Pim van Pelt <pim@ipng.nl> Change-Id: I04a45c15c0838906aa787e06660fa29f39f755fa