common/cnxk: fix missing null check in IPv6 flow parsing
PATCH 1/1 common/cnxk: fix missing null check in IPv6 flow parsing
From: Satheesh Paul <[email protected]>
Added null check in IPv6 flow pattern parsing.
Fixes a55dc02af5 ("common/cnxk: support extensions attributes in IPv6 item")
Signed-off-by Satheesh Paul <[email protected]>
Reviewed-by Jerin Jacob Kollanukkaran <[email protected]>
--- drivers/common/cnxk/roc_npc_parse.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/common/cnxk/roc_npc_parse.c +5 -3
@@ -562,9 +562,11 @@ npc_parse_lc(struct npc_parse_state *pst) ipv6_spec = pst->pattern->spec; lid =NPC_LID_LC ; lt =NPC_LT_LC_IP6 ; - rc =npc_handle_ipv6ext_attr (ipv6_spec, pst, &flags); -if (rc) -return rc; +if (ipv6_spec) { + rc =npc_handle_ipv6ext_attr (ipv6_spec, pst, &flags); +if (rc) +return rc; + } info.len =sizeof (ipv6_spec->hdr);break ;case ROC_NPC_ITEM_TYPE_ARP_ETH_IPV4 :
Signature · 1 line
2.25.4
Quoted 6 lines · On Tue, Jan 25, 2022 at 9:43 AM <[email protected]> wrote:
From: Satheesh Paul <[email protected]>
Added null check in IPv6 flow pattern parsing.
Fixes a55dc02af5 ("common/cnxk: support extensions attributes in IPv6 item")
The changeset is not correct.
Quoted 4 lines
Signed-off-by Satheesh Paul <[email protected]>Reviewed-by Jerin Jacob Kollanukkaran <[email protected]>
Updated the git commit as follows and Applied to
dpdk-next-net-mrvl/for-next-net. Thanks
common/cnxk: fix null access in IPv6 flow parsing
Added null check in IPv6 flow pattern parsing.
Fixes 474e275b1bc6 ("common/cnxk: support extensions attributes
in IPv6 item")
Cc: [email protected]
Signed-off-by Satheesh Paul <[email protected]>
Reviewed-by Jerin Jacob <[email protected]>
Quoted 26 lines
--- drivers/common/cnxk/roc_npc_parse.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)drivers/common/cnxk/roc_npc_parse.c +5
-4@@ -562,9 +562,11 @@ npc_parse_lc(struct npc_parse_state *pst) ipv6_spec = pst->pattern->spec; lid =NPC_LID_LC ; lt =NPC_LT_LC_IP6 ; - rc =npc_handle_ipv6ext_attr (ipv6_spec, pst, &flags); -if (rc) -return rc; +if (ipv6_spec) { + rc =npc_handle_ipv6ext_attr (ipv6_spec, pst, &flags); +if (rc) +return rc; + } info.len =sizeof (ipv6_spec->hdr);break ;case ROC_NPC_ITEM_TYPE_ARP_ETH_IPV4 : --2.25.4