[qca-nss-ecm] Support for GRE over PPPoE
Change-Id: I3b00b1bb688101640957b1597467a4570fed2441
Signed-off-by: Suman Ghosh <sumaghos@codeaurora.org>
diff --git a/ecm_interface.c b/ecm_interface.c
index 3ac97c7..9942980 100644
--- a/ecm_interface.c
+++ b/ecm_interface.c
@@ -2395,7 +2395,7 @@
#endif
#ifdef ECM_INTERFACE_PPTP_ENABLE
- if ((protocol == IPPROTO_GRE) && skb && v4_hdr) {
+ if ((protocol == IPPROTO_GRE) && skb && v4_hdr && (dev->priv_flags & IFF_PPP_PPTP)) {
struct gre_hdr_pptp *gre_hdr;
uint16_t proto;
int ret;
@@ -3584,7 +3584,7 @@
/*
* if the address is a local address and indev=PPTP.
*/
- if (protocol == IPPROTO_GRE && given_dest_dev && given_dest_dev->type == ARPHRD_PPP) {
+ if (protocol == IPPROTO_GRE && given_dest_dev && (given_dest_dev->priv_flags & IFF_PPP_PPTP)){
dev_put(dest_dev);
dest_dev = given_dest_dev;
if (dest_dev) {
@@ -4095,7 +4095,7 @@
#endif
#ifdef ECM_INTERFACE_PPTP_ENABLE
- if (protocol == IPPROTO_GRE && dest_dev && dest_dev->type == ARPHRD_PPP) {
+ if (protocol == IPPROTO_GRE && dest_dev && (dest_dev->priv_flags & IFF_PPP_PPTP)) {
DEBUG_TRACE("Net device: %p PPP channel is PPTP\n", dest_dev);
break;
}