Skip to contentSkip to conversation

2.4.30 CONFIG_PPP_FILTER code here w/wo modules

PATCH New magicfox 1 participant 1 message Jun 2, 2005

Subsystems (2)
lore
Share & tools
lore

magicfox

author
#0 lore raw

PATCH 1/1 2.4.30 CONFIG_PPP_FILTER code here w/wo modules

Dears,

I found that PPP_FILTER code isn't compiled in case of modules usage. Seems to be a ppp issue rather than kconfig.

Hope this help
Best regards.

net/ppp_generic.c renamed from net/ppp_generic.c.orig +10 -10
diff -urN drivers/net/ppp_generic.c.orig drivers/net/ppp_generic.c
@@ -125,10 +125,10 @@
 	struct sk_buff_head mrq;	/* MP: receive reconstruction queue */
 #endif /* CONFIG_PPP_MULTILINK */
 	struct net_device_stats stats;	/* statistics */
-#ifdef CONFIG_PPP_FILTER
+#if defined(CONFIG_PPP_FILTER) || defined(CONFIG_PPP_FILTER_MODULE)
 	struct sock_fprog pass_filter;	/* filter for packets to pass */
 	struct sock_fprog active_filter;/* filter for pkts to reset idle */
-#endif /* CONFIG_PPP_FILTER */
+#endif /* CONFIG_PPP_FILTER || CONFIG_PPP_FILTER_MODULE */
 };
 
 /*
@@ -649,7 +649,7 @@
 		err = 0;
 		break;
 
-#ifdef CONFIG_PPP_FILTER
+#if defined(CONFIG_PPP_FILTER) || defined(CONFIG_PPP_FILTER_MODULE)
 	case PPPIOCSPASS:
 	case PPPIOCSACTIVE:
 	{
@@ -686,7 +686,7 @@
 		err = 0;
 		break;
 	}
-#endif /* CONFIG_PPP_FILTER */
+#endif /* CONFIG_PPP_FILTER || CONFIG_PPP_FILTER_MODULE */
 
 #ifdef CONFIG_PPP_MULTILINK
 	case PPPIOCSMRRU:
@@ -959,7 +959,7 @@
 	unsigned char *cp;
 
 	if (proto < 0x8000) {
-#ifdef CONFIG_PPP_FILTER
+#if defined(CONFIG_PPP_FILTER) || defined(CONFIG_PPP_FILTER_MODULE)
 		/* check if we should pass this packet */
 		/* the filter instructions are constructed assuming
 		   a four-byte PPP header on each packet */
@@ -981,7 +981,7 @@
 #else
 		/* for data packets, record the time */
 		ppp->last_xmit = jiffies;
-#endif /* CONFIG_PPP_FILTER */
+#endif /* CONFIG_PPP_FILTER || CONFIG_PPP_FILTER_MODULE */
 	}
 
 	++ppp->stats.tx_packets;
@@ -1491,7 +1491,7 @@
 	} else {
 		/* network protocol frame - give it to the kernel */
 
-#ifdef CONFIG_PPP_FILTER
+#if defined(CONFIG_PPP_FILTER) || defined(CONFIG_PPP_FILTER_MODULE)
 		/* check if the packet passes the pass and active filters */
 		/* the filter instructions are constructed assuming
 		   a four-byte PPP header on each packet */
@@ -1511,7 +1511,7 @@
 		skb_pull(skb, 2);
 #else
 		ppp->last_recv = jiffies;
-#endif /* CONFIG_PPP_FILTER */
+#endif /* CONFIG_PPP_FILTER || CONFIG_PPP_FILTER_MODULE */
 
 		if ((ppp->dev->flags & IFF_UP) == 0
 		    || ppp->npmode[npi] != NPMODE_PASS) {
@@ -2363,7 +2363,7 @@
 #ifdef CONFIG_PPP_MULTILINK
 	skb_queue_purge(&ppp->mrq);
 #endif /* CONFIG_PPP_MULTILINK */
-#ifdef CONFIG_PPP_FILTER
+#if defined(CONFIG_PPP_FILTER) || defined(CONFIG_PPP_FILTER_MODULE)
 	if (ppp->pass_filter.filter) {
 		kfree(ppp->pass_filter.filter);
 		ppp->pass_filter.filter = NULL;
@@ -2372,7 +2372,7 @@
 		kfree(ppp->active_filter.filter);
 		ppp->active_filter.filter = 0;
 	}
-#endif /* CONFIG_PPP_FILTER */
+#endif /* CONFIG_PPP_FILTER || CONFIG_PPP_FILTER_MODULE */
 
 	kfree(ppp);
 }