[qca-nss-ecm] NSS acceleration support for bridged PPPoE sessions.
- CRs-Fixed: 824100
- Accelerate bridged PPPoE session flows carrying IPv4/IPv6
payloads. In such scenarios PPPoE client/server are
running on machines connected to LAN ports.
- Fix ECM tracker issue where incorrect protocol id was being
extracted from IPv6 header.
Change-Id: I428e930d29305bc4a228210758ec295ccf556ab2
Signed-off-by: Tushar Mathur <tushar@codeaurora.org>
diff --git a/ecm_tracker.c b/ecm_tracker.c
index 4bb8a6d..69d6e1f 100644
--- a/ecm_tracker.c
+++ b/ecm_tracker.c
@@ -411,6 +411,7 @@
#ifdef ECM_IPV6_ENABLE
struct ipv6hdr *v6_hdr = NULL;
int16_t this_header;
+ int16_t prev_header;
uint32_t offset;
#endif
@@ -553,6 +554,7 @@
*/
offset = 40;
this_header = (int16_t)v6_hdr->nexthdr;
+ prev_header = this_header;
while ((remain > 0) && (this_header >= 0) && (this_header != 59)) {
struct ecm_tracker_ip_protocols *etip;
struct ecm_tracker_ip_protocol_header *etiph;
@@ -589,13 +591,14 @@
DEBUG_ASSERT(remain >= etiph->size, "v6 remain: %u goes negative after header size: %u", remain, etiph->size);
remain -= etiph->size;
+ prev_header = this_header;
this_header = next_header;
}
/*
* Generally the last protocol seen is the upper layer protocol
*/
- ip_hdr->protocol = (int)this_header;
+ ip_hdr->protocol = (int)prev_header;
return true;
#endif