[PATCH] ppp: implement MRU option

Kristen Carlson Accardi kristen at linux.intel.com
Thu Apr 22 13:51:17 PDT 2010


On Thu, 22 Apr 2010 15:51:26 -0500
Denis Kenzior <denkenz at gmail.com> wrote:

> Hi Kristen,
> 
> > On Thu, 22 Apr 2010 15:16:58 -0500
> > 
> > Denis Kenzior <denkenz at gmail.com> wrote:
> > > Hi Kristen,
> > >
> > > > @@ -80,7 +88,7 @@ static gboolean ppp_net_callback(GIOChannel *channel,
> > > >  GIOCondition cond,
> > > >
> > > >  	if (cond & G_IO_IN) {
> > > >  		/* leave space to add PPP protocol field */
> > > > -		status = g_io_channel_read_chars(channel, buf + 2, MAX_PACKET,
> > > > +		status = g_io_channel_read_chars(channel, buf + 2, net->mtu,
> > > >  				&bytes_read, &error);
> > > >  		if (bytes_read > 0) {
> > > >  			ppp->proto = htons(PPP_IP_PROTO);
> > >
> > > So I actually have a concern here.  Quoting RFC 1332 Section 2.1:
> > > "Exactly one IP packet is encapsulated in the Information field of PPP
> > >    Data Link Layer frames where the Protocol field indicates type hex
> > >    0021 (Internet Protocol)."
> > >
> > > However, you're not changing the physical MTU of the TUN/TAP interface,
> > > so in effect you are mangling the packets that are larger than net->mtu. 
> > > These packets will most likely simply be discarded leading to lots of
> > > fun.
> > 
> > We can add an ioctl to change the MTU during ppp_net_set_mtu(), which
> > should hopefully resolve this.
> > 
> 
> Yep, my thinking as well.  Can you send a patch?
> 
> Thanks,
> -Denis

yes, will do.


More information about the ofono mailing list