diff options
| author | Konstantin Ananyev <[email protected]> | 2024-05-02 16:28:15 +0100 |
|---|---|---|
| committer | Thomas Monjalon <[email protected]> | 2024-07-23 17:40:43 +0200 |
| commit | 659ded8eb733315878857f82bc22f0b03be5ce71 (patch) | |
| tree | ffad88cce7cef7c47188765869c82f37c7f801a9 /examples | |
| parent | 1bd1ab6fd010837773473d821f9284369b37264c (diff) | |
examples/l3fwd: fix crash in ACL mode for mixed traffic
When running l3fwd in ACL mode, if we'll have mix of IPv4/IPv6 packets in
the same burst, it will most likely cause a crash.
The reason for that is that we split our burst of packets into 2 arrays -
one for ipv4, another for ipv6 for classify().
But then we try to send all packets as one burst again,
not taking into account that acl_search.res_ipv4[] will be set
only for ipv4 packets.
Same story for ipv6.
The fix is straightforward: use two already split arrays for TX.
Bugzilla ID: 1434
Fixes: 6de0ea50e9b9 ("examples/l3fwd: merge l3fwd-acl example")
Cc: [email protected]
Signed-off-by: Konstantin Ananyev <[email protected]>
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/l3fwd/l3fwd_acl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/l3fwd/l3fwd_acl.c b/examples/l3fwd/l3fwd_acl.c index 401692bcec..d9e4ae543f 100644 --- a/examples/l3fwd/l3fwd_acl.c +++ b/examples/l3fwd/l3fwd_acl.c @@ -1073,9 +1073,9 @@ acl_main_loop(__rte_unused void *dummy) l3fwd_acl_send_packets( qconf, - pkts_burst, + acl_search.m_ipv4, acl_search.res_ipv4, - nb_rx); + acl_search.num_ipv4); } if (acl_search.num_ipv6) { @@ -1088,9 +1088,9 @@ acl_main_loop(__rte_unused void *dummy) l3fwd_acl_send_packets( qconf, - pkts_burst, + acl_search.m_ipv6, acl_search.res_ipv6, - nb_rx); + acl_search.num_ipv6); } } } |
