22 Commits

Author SHA1 Message Date
Renato Botelho do Couto
893dacae3f build: Use $(MAKE) instead of direct call to make
No functional changes, just make it to respect original make binary
name used to start building

Type: improvement

Change-Id: Ic8568237fbb39c6a0d3b7405a9670e9410aeb752
Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
2024-06-10 13:13:31 +00:00
Gabriel Oginski
b953532ed4 vpp-swan: fix config to run containers
This patch changes config to run containers on Ubuntu 22.04.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I3be48099cb48d2c4a04526c15780244614bef3d4
2023-10-05 10:37:37 +00:00
Gabriel Oginski
052b023488 vpp-swan: fix configuration of policies
This patch fixes configuration of priority, port and type of protocol
for inbound and outbound policies in policy-based IPsec of this plugin.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I01ddc2e13ebbe87380e66a525aac1b615f619604
2023-09-15 11:19:16 +02:00
Gabriel Oginski
c3f505fe7b vpp-swan: fix handler API messages
In the current implementation there is a bug related to the incorrect
message handling due to the wrong id.

The fix changes logic responsible for handling incoming API messages
by correcting their ids.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Iea29506053c9fd2e1d01bce83e7f4a6e1de39321
2023-07-24 08:15:21 +00:00
Gabriel Oginski
0e1fe7ba86 vpp-swan: change flow in function for add route
This patch addresses the issue when the list of available interfaces
is not up to date. Due to this issue adding a new route fails
and finally the connection is not established.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I3a63c0dd99ebc28ea149b4b23867440937682761
2023-07-19 02:38:00 +00:00
Gabriel Oginski
efd2350d65 vpp-swan: fix incorrect msg ID in register_event
This patch addresses the issue where the message ID registration
in the register_event function is incorrect. Due to this incorrect
registration, the lookup for the corresponding callback on received
messages fails, eventually leading to a segmentation fault
and double-free memory space.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: If95182f972f64adb44d514e18c831cc9627d8f0f
2023-07-19 02:32:11 +00:00
Gabriel Oginski
73d82d1273 vpp-swan: fix function to get sw_if_index
In the current implementation there is a bug in the function
responsible for getting software interface index by the name of the
interface. Incorrect function is used to send the API message, also
the handler with replied message is incorrect.

The fix changes function to send dump message and also adds handler
with replied message in the correct way.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Id1a3ba2ce7e92d216907f344431b9e2acb1d5572
2023-07-19 02:31:21 +00:00
Gabriel Oginski
980f3fb2d3 vpp-swan: assign src/dst port in udp encap
This patch add in missing src/dst port assignment in SA for udp port
if encap.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I84219c016c5a32590aba0371c01ad8d44cbf4c5c
2023-04-25 15:50:05 +00:00
Gabriel Oginski
2da99e5072 vpp-swan: fix memory leaks
This patch fix the memory leaks discovered in the current
implementation, inlcuding expired data, spd dump, and host names.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I3794f5db3c58d1e78df25f242c91e7a67363de53
2023-03-02 13:23:24 +00:00
Fan Zhang
ad215f211d vpp-swan: improve Makefile
Type: improvement

Since VPP-SWAN does not really need StrongSwan to be compiled,
this patch refines the Makefile to reflect the change.

In addition README is updated.

Signed-off-by: Fan Zhang <fanzhang.oss@gmail.com>
Change-Id: I185957167ac71a44f4d12e78e1dac31c194f80f4
2023-03-01 15:54:40 +00:00
Gabriel Oginski
9cb3e15c9f vpp-swan: fix segmentation fault in arp function
This patch adds a missing file descriptor free handler to prevent
invalid dereferencing in the future

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Idc809a70b1fedec9a06446344d5481d467c78c19
2023-02-27 13:40:05 +00:00
Gabriel Oginski
8de66c090e vpp-swan: removed adding the same rule in SPD
The current implementation of vpp-swan plugin adds the same policy rule
in SPD twice, and it is not necessary to have two the same rules in
inbound-protect database.

This patch fixes an issue that prevents the addition of a second
identical policy rule in SPD.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Ieef74288e5301455658e4e101433147d6d2482e9
2023-02-14 01:20:34 +00:00
Atzm Watanabe
fc2d95d115 vpp-swan: allow SAs to be used to the route-based IPsec
This patch adds a "charon.plugins.kernel-vpp.use_tunnel_mode_sa"
key into strongswan.conf.  If this is turned off, SAs will be
installed without tunnel information and can be used to
"ipsec tunnel protect".  For the route-based IPsec, it will be
used with turning "policies" off in swanctl.conf.

Type: feature

Signed-off-by: Atzm Watanabe <atzmism@gmail.com>
Change-Id: I58fb94bfe56627fa7002d9b95c48930a32993d2d
2023-02-03 14:24:51 +00:00
Timur Celik
20721177ec vpp-swan: Fix segfault for multiple addresses
In order to loop over the list of `vl_api_ip_address_details_t`,
increment the pointer by one instead of `i`.

Type: fix
Change-Id: I8554d1388d67bb95e029eddf444d383fb85ecac7
Signed-off-by: Timur Celik <mail@timurcelik.de>
2022-11-23 14:46:32 +00:00
Yulong Pei
de0c1af447 vpp-swan: remove step to copy vpp_sswan source for docker image
Since vpp_sswan plugin already merged in /vpp/extras/strongswan,
no need to provide additional vpp_sswan source files for docker image.

Type: fix

Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Change-Id: I35bad22b1046e0dddbcf39e1af38d589d1438239
Signed-off-by: Yulong Pei <yulong.pei@intel.com>
2022-11-01 20:20:50 +00:00
Gabriel Oginski
ce62d6f01c vpp-swan: fix linked library to plugin
Due to refactor keeping api common code in vlibapi, changes order
linked library to this plugin.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Id94c0b78cbce4954d34a82123506a76370b12b23
2022-10-12 21:16:54 +00:00
Gabriel Oginski
95875774bc vpp-swan: Add scripts for testing
Added scripts to reparing setups for testing

To prepare and run containers:
sudo ./extras/strongswan/vpp_sswan/docker/run.sh prepare_containers

To prepare setups:
sudo ./extras/strongswan/vpp_sswan/docker/run.sh config

To clean-up settups:
sudo ./extras/strongswan/vpp_sswan/docker/run.sh clean

To deleted all containers and images in Docker:
sudo ./extras/strongswan/vpp_sswan/docker/run.sh deleted

Type: feature
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I77f01c0419dccc95f610046c8552ae825f2c7e12
2022-09-28 17:46:04 +00:00
Gabriel Oginski
4e88e041ad vpp-swan: Add plugin for vpp-swan
Added plugin vpp-swan is a plugin that helps offloading
Strongswan IPsec ESP process from Linux Kernel to VPP.

Type: feature
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Iec77945892453fac1890d3c49d7d86fc6b09c893
2022-09-28 17:45:26 +00:00
Filip Tehlar
9196ed798a misc: update config script in IKEv2 test
Type: fix

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Iba82f8e0f18f3e1e4da57f4c23ba9272e87afd93
2022-05-18 09:46:33 +00:00
Nathan Skrzypczak
a2c9509a4a docs: convert extras doc md->rst
Type: improvement

Change-Id: Ie3b25a86b99098d2b3a21a11fc73234c8ed589d6
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-10-13 15:32:22 +00:00
Dave Wallace
84b543d8b1 doxygen: fix doxygen tags
- Missing tags mess up doxygen TOC heirarchy

Type: docs

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I012d55c0ae90aecc665b56903f4212ddc0643943
2021-05-21 15:33:04 +00:00
Filip Tehlar
d5a3380c65 misc: add ikev2 tests usecases
Type: test
Ticket: VPP-1893

Change-Id: Ib6ffd00e73f7110bf9e702f4a0fd5c68395d6786
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2021-03-04 14:57:54 +00:00