* [dpdk-dev] [PATCH v1] examples/ipsec-secgw: return on encountering algo as NULL
@ 2019-12-12 9:14 Savinay Dharmappa
2019-12-12 11:30 ` Ananyev, Konstantin
2019-12-13 11:49 ` [dpdk-dev] [PATCH v2] " Savinay Dharmappa
0 siblings, 2 replies; 6+ messages in thread
From: Savinay Dharmappa @ 2019-12-12 9:14 UTC (permalink / raw)
To: dev; +Cc: konstantin.ananyev
if algo is NULL set the status to error and return.
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
---
examples/ipsec-secgw/sa.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 7f046e3ed..c75a5a15f 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -314,6 +314,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
+ if (status->status < 0)
+ return;
+
rule->cipher_algo = algo->algo;
rule->block_size = algo->block_size;
rule->iv_len = algo->iv_len;
@@ -378,6 +381,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
+ if (status->status < 0)
+ return;
+
rule->auth_algo = algo->algo;
rule->auth_key_len = algo->key_len;
rule->digest_len = algo->digest_len;
@@ -433,6 +439,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
+ if (status->status < 0)
+ return;
+
rule->aead_algo = algo->algo;
rule->cipher_key_len = algo->key_len;
rule->digest_len = algo->digest_len;
--
2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH v1] examples/ipsec-secgw: return on encountering algo as NULL
2019-12-12 9:14 [dpdk-dev] [PATCH v1] examples/ipsec-secgw: return on encountering algo as NULL Savinay Dharmappa
@ 2019-12-12 11:30 ` Ananyev, Konstantin
2019-12-13 11:49 ` [dpdk-dev] [PATCH v2] " Savinay Dharmappa
1 sibling, 0 replies; 6+ messages in thread
From: Ananyev, Konstantin @ 2019-12-12 11:30 UTC (permalink / raw)
To: Dharmappa, Savinay, dev
Hi,
> if algo is NULL set the status to error and return.
As this is a bug fix please add 'fix' to the commit header:
examples/ipsec-secgw: fix ...
Also probably worth to add 1-2 line explanation why this is needed
into the commit message.
Apart from that:
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
>
> Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
> ---
> examples/ipsec-secgw/sa.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
> index 7f046e3ed..c75a5a15f 100644
> --- a/examples/ipsec-secgw/sa.c
> +++ b/examples/ipsec-secgw/sa.c
> @@ -314,6 +314,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> APP_CHECK(algo != NULL, status, "unrecognized "
> "input \"%s\"", tokens[ti]);
>
> + if (status->status < 0)
> + return;
> +
> rule->cipher_algo = algo->algo;
> rule->block_size = algo->block_size;
> rule->iv_len = algo->iv_len;
> @@ -378,6 +381,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> APP_CHECK(algo != NULL, status, "unrecognized "
> "input \"%s\"", tokens[ti]);
>
> + if (status->status < 0)
> + return;
> +
> rule->auth_algo = algo->algo;
> rule->auth_key_len = algo->key_len;
> rule->digest_len = algo->digest_len;
> @@ -433,6 +439,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> APP_CHECK(algo != NULL, status, "unrecognized "
> "input \"%s\"", tokens[ti]);
>
> + if (status->status < 0)
> + return;
> +
> rule->aead_algo = algo->algo;
> rule->cipher_key_len = algo->key_len;
> rule->digest_len = algo->digest_len;
> --
> 2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH v2] examples/ipsec-secgw: return on encountering algo as NULL
2019-12-12 9:14 [dpdk-dev] [PATCH v1] examples/ipsec-secgw: return on encountering algo as NULL Savinay Dharmappa
2019-12-12 11:30 ` Ananyev, Konstantin
@ 2019-12-13 11:49 ` Savinay Dharmappa
2019-12-13 11:57 ` Ananyev, Konstantin
2019-12-16 7:34 ` [dpdk-dev] [PATCH v3] examples/ipsec-secgw: fix application crash Savinay Dharmappa
1 sibling, 2 replies; 6+ messages in thread
From: Savinay Dharmappa @ 2019-12-13 11:49 UTC (permalink / raw)
To: dev; +Cc: konstantin.ananyev
if algo is NULL set the status to error and return. This change
prevent crashing of ipsec-secgw application when a specific
cipher/auth/aead algo are not supported by application.
Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
examples/ipsec-secgw/sa.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 7f046e3ed..c75a5a15f 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -314,6 +314,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
+ if (status->status < 0)
+ return;
+
rule->cipher_algo = algo->algo;
rule->block_size = algo->block_size;
rule->iv_len = algo->iv_len;
@@ -378,6 +381,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
+ if (status->status < 0)
+ return;
+
rule->auth_algo = algo->algo;
rule->auth_key_len = algo->key_len;
rule->digest_len = algo->digest_len;
@@ -433,6 +439,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
+ if (status->status < 0)
+ return;
+
rule->aead_algo = algo->algo;
rule->cipher_key_len = algo->key_len;
rule->digest_len = algo->digest_len;
--
2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH v2] examples/ipsec-secgw: return on encountering algo as NULL
2019-12-13 11:49 ` [dpdk-dev] [PATCH v2] " Savinay Dharmappa
@ 2019-12-13 11:57 ` Ananyev, Konstantin
2020-01-15 15:56 ` Akhil Goyal
2019-12-16 7:34 ` [dpdk-dev] [PATCH v3] examples/ipsec-secgw: fix application crash Savinay Dharmappa
1 sibling, 1 reply; 6+ messages in thread
From: Ananyev, Konstantin @ 2019-12-13 11:57 UTC (permalink / raw)
To: Dharmappa, Savinay, dev
Hi,
> if algo is NULL set the status to error and return. This change
> prevent crashing of ipsec-secgw application when a specific
> cipher/auth/aead algo are not supported by application.
It seems you forgot 'fix' in the header 😊
examples/ipsec-secgw: fix ...
>
> Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
>
> Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> ---
> examples/ipsec-secgw/sa.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
> index 7f046e3ed..c75a5a15f 100644
> --- a/examples/ipsec-secgw/sa.c
> +++ b/examples/ipsec-secgw/sa.c
> @@ -314,6 +314,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> APP_CHECK(algo != NULL, status, "unrecognized "
> "input \"%s\"", tokens[ti]);
>
> + if (status->status < 0)
> + return;
> +
> rule->cipher_algo = algo->algo;
> rule->block_size = algo->block_size;
> rule->iv_len = algo->iv_len;
> @@ -378,6 +381,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> APP_CHECK(algo != NULL, status, "unrecognized "
> "input \"%s\"", tokens[ti]);
>
> + if (status->status < 0)
> + return;
> +
> rule->auth_algo = algo->algo;
> rule->auth_key_len = algo->key_len;
> rule->digest_len = algo->digest_len;
> @@ -433,6 +439,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
> APP_CHECK(algo != NULL, status, "unrecognized "
> "input \"%s\"", tokens[ti]);
>
> + if (status->status < 0)
> + return;
> +
> rule->aead_algo = algo->algo;
> rule->cipher_key_len = algo->key_len;
> rule->digest_len = algo->digest_len;
> --
> 2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH v3] examples/ipsec-secgw: fix application crash.
2019-12-13 11:49 ` [dpdk-dev] [PATCH v2] " Savinay Dharmappa
2019-12-13 11:57 ` Ananyev, Konstantin
@ 2019-12-16 7:34 ` Savinay Dharmappa
1 sibling, 0 replies; 6+ messages in thread
From: Savinay Dharmappa @ 2019-12-16 7:34 UTC (permalink / raw)
To: dev; +Cc: konstantin.ananyev
if algo is NULL set the status to error and return. This change
prevent crashing of ipsec-secgw application when a specific
cipher/auth/aead algo are not supported by application.
Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
examples/ipsec-secgw/sa.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 7f046e3ed..c75a5a15f 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -314,6 +314,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
+ if (status->status < 0)
+ return;
+
rule->cipher_algo = algo->algo;
rule->block_size = algo->block_size;
rule->iv_len = algo->iv_len;
@@ -378,6 +381,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
+ if (status->status < 0)
+ return;
+
rule->auth_algo = algo->algo;
rule->auth_key_len = algo->key_len;
rule->digest_len = algo->digest_len;
@@ -433,6 +439,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
APP_CHECK(algo != NULL, status, "unrecognized "
"input \"%s\"", tokens[ti]);
+ if (status->status < 0)
+ return;
+
rule->aead_algo = algo->algo;
rule->cipher_key_len = algo->key_len;
rule->digest_len = algo->digest_len;
--
2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH v2] examples/ipsec-secgw: return on encountering algo as NULL
2019-12-13 11:57 ` Ananyev, Konstantin
@ 2020-01-15 15:56 ` Akhil Goyal
0 siblings, 0 replies; 6+ messages in thread
From: Akhil Goyal @ 2020-01-15 15:56 UTC (permalink / raw)
To: Ananyev, Konstantin, Dharmappa, Savinay, dev
> Hi,
>
>
> > if algo is NULL set the status to error and return. This change
> > prevent crashing of ipsec-secgw application when a specific
> > cipher/auth/aead algo are not supported by application.
>
> It seems you forgot 'fix' in the header 😊
> examples/ipsec-secgw: fix ...
Fixed title.
>
> >
> > Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
> >
> > Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
> > Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> > ---
Applied to dpdk-next-crypto
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-01-15 15:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-12 9:14 [dpdk-dev] [PATCH v1] examples/ipsec-secgw: return on encountering algo as NULL Savinay Dharmappa
2019-12-12 11:30 ` Ananyev, Konstantin
2019-12-13 11:49 ` [dpdk-dev] [PATCH v2] " Savinay Dharmappa
2019-12-13 11:57 ` Ananyev, Konstantin
2020-01-15 15:56 ` Akhil Goyal
2019-12-16 7:34 ` [dpdk-dev] [PATCH v3] examples/ipsec-secgw: fix application crash Savinay Dharmappa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).