[qca-nss-clients] Fix ipsec restart issue.
Not sending the ipv4_destroy message to NSS properly.
Correct the message structure.
Change-Id: Ifbdae6267b897cf466a8845ac91139675669775d
Signed-off-by: mandrw <mandrw@codeaurora.org>
diff --git a/netlink/nss_nlipv4.c b/netlink/nss_nlipv4.c
index 4f26813..e30c508 100755
--- a/netlink/nss_nlipv4.c
+++ b/netlink/nss_nlipv4.c
@@ -233,9 +233,8 @@
* nss_nlipv4_verify_5tuple()
* verify and override 5-tuple entries
*/
-static int nss_nlipv4_verify_5tuple(struct nss_ipv4_rule_create_msg *msg)
+static int nss_nlipv4_verify_5tuple(struct nss_ipv4_5tuple *tuple)
{
- struct nss_ipv4_5tuple *tuple = &msg->tuple;
bool ident_check = false;
/*
@@ -601,7 +600,7 @@
/*
* check 5-tuple
*/
- error = nss_nlipv4_verify_5tuple(&nim->msg.rule_create);
+ error = nss_nlipv4_verify_5tuple(&nim->msg.rule_create.tuple);
if (error < 0) {
nss_nl_error("%d:invalid 5-tuple information passed\n", pid);
goto done;
@@ -731,7 +730,7 @@
/*
* check 5-tuple
*/
- error = nss_nlipv4_verify_5tuple(&nim->msg.rule_create);
+ error = nss_nlipv4_verify_5tuple(&nim->msg.rule_destroy.tuple);
if (error < 0) {
nss_nl_error("%d:invalid 5-tuple information passed\n", pid);
goto done;
diff --git a/netlink/nss_nlipv6.c b/netlink/nss_nlipv6.c
index ece3145..42a90d5 100644
--- a/netlink/nss_nlipv6.c
+++ b/netlink/nss_nlipv6.c
@@ -228,10 +228,8 @@
* nss_nlipv6_verify_5tuple()
* verify and override 5-tuple entries
*/
-static int nss_nlipv6_verify_5tuple(struct nss_ipv6_rule_create_msg *msg)
+static int nss_nlipv6_verify_5tuple(struct nss_ipv6_5tuple *tuple)
{
- struct nss_ipv6_5tuple *tuple = &msg->tuple;
-
/*
* protocol must be provided
*/
@@ -563,7 +561,7 @@
/*
* check 5-tuple
*/
- error = nss_nlipv6_verify_5tuple(&nim->msg.rule_create);
+ error = nss_nlipv6_verify_5tuple(&nim->msg.rule_create.tuple);
if (error < 0) {
nss_nl_error("%d:invalid 5-tuple information passed\n", pid);
goto done;
@@ -700,7 +698,7 @@
/*
* check 5-tuple
*/
- error = nss_nlipv6_verify_5tuple(&nim->msg.rule_create);
+ error = nss_nlipv6_verify_5tuple(&nim->msg.rule_destroy.tuple);
if (error < 0) {
nss_nl_error("%d:invalid 5-tuple information passed\n", pid);
goto done;