[PATCH 2/2] ppp: do not allow mtu > 1500 to be set

Kristen Carlson Accardi kristen at linux.intel.com
Thu Apr 22 14:22:56 PDT 2010


---
 gatchat/ppp_net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gatchat/ppp_net.c b/gatchat/ppp_net.c
index fc1f9fb..53d62fa 100644
--- a/gatchat/ppp_net.c
+++ b/gatchat/ppp_net.c
@@ -53,7 +53,7 @@ void ppp_net_set_mtu(struct ppp_net *net, guint16 mtu)
 	struct ifreq ifr;
 	int sock;
 
-	if (net == NULL)
+	if (net == NULL || mtu >= MAX_PACKET)
 		return;
 
 	net->mtu = mtu;
-- 
1.6.6.1



More information about the ofono mailing list