Download raw body.
pppoe(4): replace PPPOE_TERM_UNKNOWN_SESSIONS with ifconfig knob
pppoe(4): replace PPPOE_TERM_UNKNOWN_SESSIONS with ifconfig knob
pppoe(4): replace PPPOE_TERM_UNKNOWN_SESSIONS with ifconfig knob
On Tue 13/10/2026 15:22, Renaud Allard wrote: > On Fri, Jan 10, 2025 at 06:37:17AM +0100, Bjorn Ketelaars wrote: > > From: Bjorn Ketelaars <bket@openbsd.org> > > To: tech@openbsd.org > > Subject: Re: pppoe(4): replace PPPOE_TERM_UNKNOWN_SESSIONS with ifconfig > > knob > > Date: Fri, 10 Jan 2025 06:37:17 +0100 > > > > On Fri 27/12/2024 20:32, Bjorn Ketelaars wrote: > > > The pppoe(4) manpage describes the kernel option > > > PPPOE_TERM_UNKNOWN_SESSIONS, which addresses an issue with > > > re-establishing a connection after a power failure. Rather than > > > requiring a kernel recompile, the proposal is to make this fix > > > configurable via an ifconfig(8) knob. > > > This fix provides a convenient solution for resolving issues I encounter > > > with reconnecting to my ISP. > > > > > > The diff below includes the necessary changes to implement this and > > > updates to relevant manpages. > > > > > > Comments/tests/OK? > > > > Anyone interested in this? > > > > Diff enclosed again for your convenience. > > > > May I propose you the following, which doesn't send packets when down, > is a little bit quieter and only sends one PADT per stale frame. > > > diff --git share/man/man4/options.4 share/man/man4/options.4 > index 635532df510..dccc7c92d80 100644 > --- share/man/man4/options.4 > +++ share/man/man4/options.4 > @@ -385,10 +385,6 @@ Enables BSD compressor for PPP connections. > .It Cd option PPP_DEFLATE > For use in conjunction with PPP_BSDCOMP; provides an interface to zlib for PPP > for deflate compression/decompression. > -.It Cd option PPPOE_TERM_UNKNOWN_SESSIONS > -Send PADT to terminate open sessions before connecting. > -See > -.Xr pppoe 4 . > .It Cd option SOCKET_SPLICE > Enables zero-copy socket splicing in the kernel. > See > diff --git share/man/man4/pppoe.4 share/man/man4/pppoe.4 > index 98637cf22fb..d078d926eae 100644 > --- share/man/man4/pppoe.4 > +++ share/man/man4/pppoe.4 > @@ -126,7 +126,8 @@ the gateway will be changed to the suggested address as well. > .Pp > Otherwise, PPP negotiation will only agree to exactly the IPv4 addresses > which are configured on the interface. > -.Sh KERNEL OPTIONS > +.Pp > +By default, > .Nm > does not interfere with other PPPoE implementations > running on the same machine. > @@ -137,13 +138,22 @@ reestablish a new PPPoE connection > because there is already an open session. > This would be indicated by the client sending a high number of PADI packets > before successfully connecting. > -The > +Setting > +.Em link2 > +makes > .Nm > -driver can be told to kill all unknown PPPoE sessions > -by sending a PADT packet to explicitly terminate the old session. > -Add the following to the kernel config file: > -.Pp > -.Dl option PPPOE_TERM_UNKNOWN_SESSIONS > +answer packets for unknown sessions on its Ethernet interface > +with a PADT packet to explicitly terminate the old session, > +as long as no > +.Nm > +interface has an established session. > +Sessions of other PPPoE implementations > +using the same Ethernet interface are unknown to > +.Nm > +and would be terminated as well, > +so > +.Em link2 > +should not be set in that case. > .Sh PPPOE AND MTU/MSS > PPPoE has an 8-byte header. > When run over a network interface with the Thanks for looking at this! Your version addresses the issue more neatly. Avoiding sending when down, keeping the logging quieter, and sending only one PADT per stale frame all make sense to me. One small manpage comment: another established session doesn't prevent the unknown-session path from sending a PADT. Should we replace "as long as no pppoe interface has an established session" with "when the pppoe interface is up"? With the kernel option going away, it would also be useful to mention the replacement in https://www.openbsd.org/faq/current.html, so people using PPPOE_TERM_UNKNOWN_SESSIONS know to enable link2 instead. Perhaps: The kernel option PPPOE_TERM_UNKNOWN_SESSIONS has been removed. To enable termination of unknown PPPoE sessions, add link2 to /etc/hostname.pppoe0 (adjusting the interface name as needed). This only takes effect while the interface is up. Do not enable it if another PPPoE implementation uses the same Ethernet interface, as its sessions may also be terminated. I have built this and am currently running it on my home connection. I have not experienced the issue with my ISP for some time now, so I no longer seem to need this and have not been able to see the stale-session recovery. Still, so far nothing has exploded. I would like to see this get in. I am not a kernel developer, so my OK carries limited weight here. Nevertheless, OK bket@
pppoe(4): replace PPPOE_TERM_UNKNOWN_SESSIONS with ifconfig knob
pppoe(4): replace PPPOE_TERM_UNKNOWN_SESSIONS with ifconfig knob
pppoe(4): replace PPPOE_TERM_UNKNOWN_SESSIONS with ifconfig knob