Index | Thread | Search

From:
Denis Fondras <openbsd@ledeuns.net>
Subject:
Re: ppp(4) : Add IPv6 support
To:
Claudio Jeker <cjeker@diehard.n-r-g.com>, tech@openbsd.org
Date:
Tue, 27 Feb 2024 20:39:58 +0100

Download raw body.

Thread
Le Tue, Feb 27, 2024 at 11:17:54AM +0100, Claudio Jeker a écrit :
> On Mon, Feb 26, 2024 at 08:49:34PM +0100, Denis Fondras wrote:
> > Here is a diff to add IPv6 support to ppp(4).
> > With this diff, I can send and receive IPv6 packets over a PPP connection.
> > 
> > Anyone confortable to get this in ?
> 
> Looks good to me. OK claudio@
>

Thank you Claudio.

> How does this interact with the various compression methods? Did you look
> into that?
>  

I haven't. I'll take a look.

> > +#ifdef INET6
> > +	case PPP_IPV6:
> > +		/*
> > +		 * IPv6 packet - take off the ppp header and pass it up to IPv6.
> > +		 */
> > +		if ((ifp->if_flags & IFF_UP) == 0 ||
> > +		    sc->sc_npmode[NP_IPV6] != NPMODE_PASS) {
> > +			/* interface is down - drop the packet. */
> > +			m_freem(m);
> > +			return;
> > +		}
> > +		m->m_pkthdr.len -= PPP_HDRLEN;
> > +		m->m_data += PPP_HDRLEN;
> > +		m->m_len -= PPP_HDRLEN;
> 
> I know this is a copy of the PPP_IP case but isn't that above normally
> spelled 'm_adj(m, PPP_HDRLEN);' ?
>   

I can convert it :)

> > +		ipv6_input(ifp, m);
> > +		rv = 1;
> > +		break;
> > +#endif
> 
> -- 
> :wq Claudio