Skip to contentSkip to conversation

ppp: do not allow mtu > 1500 to be set

PATCH New Kristen Carlson Accardi 1 participant 1 message Apr 22, 2010

lore
Share & tools
lore
#0 lore raw

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

---
 gatchat/ppp_net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
gatchat/ppp_net.c +1 -1
index fc1f9fb..53d62fa 100644
@@ -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;
Signature · 1 line
1.6.6.1