[qca-nss-clients] Use sync APIs for flow/SA add API
Use sync API in nlcfg for SA/Flow add cases
Change-Id: I7bb1fd61733b30040b24811cdafa9fefd8ff3355
Signed-off-by: Ratheesh Kannoth <rkannoth@codeaurora.org>
diff --git a/netlink/nss_nlipsec.c b/netlink/nss_nlipsec.c
index 0c66fa9..509a6ac 100644
--- a/netlink/nss_nlipsec.c
+++ b/netlink/nss_nlipsec.c
@@ -502,7 +502,7 @@
sa_data->cmn.keys.auth_key = sa_rule->auth_key;
sa_data->cmn.keys.nonce = sa_rule->nonce;
- if (nss_ipsecmgr_sa_add(dev, &sa_rule->tuple, sa_data, &if_num)) {
+ if (nss_ipsecmgr_sa_add_sync(dev, &sa_rule->tuple, sa_data, &if_num)) {
nss_nl_error("%d: Failed to add SA for net device(%s)\n", pid, nl_rule->ifname);
error = -EINVAL;
}
@@ -567,7 +567,7 @@
flow_tuple = &nl_rule->rule.flow.tuple;
sa_tuple = &nl_rule->rule.flow.sa;
- if (nss_ipsecmgr_flow_add(dev, flow_tuple, sa_tuple)) {
+ if (nss_ipsecmgr_flow_add_sync(dev, flow_tuple, sa_tuple)) {
nss_nl_error("%d: Failed to add subnet for net_device(%s)", pid, nl_rule->ifname);
error = -EINVAL;
}