diff -pruN 3.12-1.2/configs/pppoe.conf 3.15-1/configs/pppoe.conf
--- 3.12-1.2/configs/pppoe.conf	2015-11-11 15:10:00.000000000 +0000
+++ 3.15-1/configs/pppoe.conf	2021-05-07 13:18:00.000000000 +0000
@@ -10,6 +10,7 @@
 #       "pppoe" executable.
 #
 # Copyright (C) 2000 Roaring Penguin Software Inc.
+# Copyright (C) 2018-2021 Dianne Skoll
 #
 # This file may be distributed under the terms of the GNU General
 # Public License.
diff -pruN 3.12-1.2/debian/changelog 3.15-1/debian/changelog
--- 3.12-1.2/debian/changelog	2018-12-02 15:34:59.000000000 +0000
+++ 3.15-1/debian/changelog	2022-01-25 20:43:51.000000000 +0000
@@ -1,3 +1,15 @@
+rp-pppoe (3.15-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Update debian/watch to point to new website.
+  * Remove 04_ignore_broadcasted_pado_packets.patch (applied upstream).
+  * Remove 07_pppoestart-echo.patch (applied upstream).
+  * Bump Standards-Version.
+  * Bump debhelper-compat.
+  * Take over maintainership.
+
+ -- Lee Garrett <debian@rocketjump.eu>  Tue, 25 Jan 2022 21:43:51 +0100
+
 rp-pppoe (3.12-1.2) unstable; urgency=medium
 
   * Non-maintainer upload.
@@ -29,11 +41,11 @@ rp-pppoe (3.12-1) unstable; urgency=medi
   * Don't ship pppoe-setup as it it's not needed. Closes: #426621, #747144.
   * Add debian/watch file with signature verification.
   * Add .gitignore to the git repo.
-  * Remove confusing documentation that was accidentally re-introduced between 
+  * Remove confusing documentation that was accidentally re-introduced between
     3.5 and 3.8. Closes: #426621.
   * Add hardening flags to debian/rules.
 
- -- Lee Garrett <lgarrett@rocketjump.eu>  Wed, 22 Jun 2016 16:53:15 +0200
+ -- Lee Garrett <debian@rocketjump.eu>  Wed, 22 Jun 2016 16:53:15 +0200
 
 rp-pppoe (3.8-3) unstable; urgency=low
 
@@ -75,7 +87,7 @@ rp-pppoe (3.8-1) unstable; urgency=low
   * New upstream release
   * Upstream incorporated different version of security patch for -D and -p
     that drops priviledges for these options. Dropping Debian patch.
-  
+
  -- Christian Hudon <chrish@debian.org>  Tue, 25 Apr 2006 20:53:50 -0400
 
 rp-pppoe (3.5-4) unstable; urgency=high
@@ -85,7 +97,7 @@ rp-pppoe (3.5-4) unstable; urgency=high
     compromise by users in group dip when pppoe is running setuid root.
     [src/pppoe.c, CAN-2004-0564] Note that group dip is empty by default
     on Debian installs.
-  
+
  -- Christian Hudon <chrish@debian.org>  Wed, 29 Sep 2004 22:08:20 -0400
 
 rp-pppoe (3.5-3) unstable; urgency=medium
@@ -123,7 +135,7 @@ rp-pppoe (3.5-1) unstable; urgency=low
   * Remove prcs merge log (pppoe.log) during debian/rules clean.
   * Add note about default-asyncmap to README.Debian, pending further
     investigation.
-  * Add note to README.Debian about T-Online users needing to quote the 
+  * Add note to README.Debian about T-Online users needing to quote the
     username in the dsl-provider file. (Closes: #132996)
 
  -- Christian Hudon <chrish@debian.org>  Mon, 24 Mar 2003 20:22:00 -0500
@@ -140,10 +152,10 @@ rp-pppoe (3.3-1.1) unstable; urgency=low
 
   * Non Maintainer Upload.
   * mark /etc/ppp/ppp_on_boot.dsl as conffile (closes: #132117)
-  * use full path in /etc/ppp/peers/dsl-provider ppp_on_boot.dsl 
+  * use full path in /etc/ppp/peers/dsl-provider ppp_on_boot.dsl
     (closes: #111551)
   * small fix so can build on potato (closes: #117316)
-  * remove references to adsl-* in manpages and point user to 
+  * remove references to adsl-* in manpages and point user to
     /usr/share/doc/pppoe/README.Debian (closes: #71840)
 
  -- David Kimdon <dwhedon@debian.org>  Sun,  3 Feb 2002 16:44:55 -0800
@@ -160,7 +172,7 @@ rp-pppoe (3.2-1) unstable; urgency=low
   * New upstream release.
   * Replaced wrapper by patch from Eduard Bloch that makes pppoe bring
     the interface up if it wasn't up. (Closes: #106970)
-  * Bugs fixed in this or a previous release: 
+  * Bugs fixed in this or a previous release:
     closes: #94540, #83918, #70834, #72065, #80137, #86226, #79319, #75443, #67863, #79529, #88499, #91330.
 
  -- Christian Hudon <chrish@debian.org>  Mon, 20 Aug 2001 19:26:45 -0400
@@ -228,6 +240,3 @@ rp-pppoe (0.99b-1) unstable; urgency=low
   * Initial Debian release.
 
  -- Christian Hudon <chrish@debian.org>  Thu, 30 Dec 1999 21:07:44 -0500
-
-
-
diff -pruN 3.12-1.2/debian/compat 3.15-1/debian/compat
--- 3.12-1.2/debian/compat	2016-12-25 10:07:18.000000000 +0000
+++ 3.15-1/debian/compat	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-9
diff -pruN 3.12-1.2/debian/control 3.15-1/debian/control
--- 3.12-1.2/debian/control	2016-12-25 10:07:18.000000000 +0000
+++ 3.15-1/debian/control	2022-01-25 20:39:53.000000000 +0000
@@ -1,10 +1,13 @@
 Source: rp-pppoe
-Maintainer: Andreas Barth <aba@not.so.argh.org>
-Standards-Version: 3.9.8
+Maintainer: Lee Garrett <debian@rocketjump.eu>
+Standards-Version: 4.6.0.1
 Section: net
 Priority: optional
-Build-Depends: debhelper (>= 9)
-Uploaders: Lee Garrett <lgarrett@rocketjump.eu>
+Build-Depends: debhelper-compat (= 13)
+Rules-Requires-Root: binary-targets
+Vcs-Browser: https://salsa.debian.org/debian/rp-pppoe
+Vcs-Git: https://salsa.debian.org/debian/rp-pppoe.git
+Homepage: https://dianne.skoll.ca/projects/rp-pppoe/
 
 Package: pppoe
 Architecture: any
diff -pruN 3.12-1.2/debian/copyright 3.15-1/debian/copyright
--- 3.12-1.2/debian/copyright	2016-12-25 10:07:18.000000000 +0000
+++ 3.15-1/debian/copyright	2022-01-25 20:34:36.000000000 +0000
@@ -10,7 +10,7 @@ License: GPL-2.0+
 Files: debian/*
 Copyright: 1999-2006 Christian Hudon <chrish@debian.org>
            2006-2007 Andreas Barth <aba@not.so.argh.org>
-           2016 Lee Garrett <lgarrett@rocketjump.eu>
+           2016-2022 Lee Garrett <debian@rocketjump.eu>
 License: GPL-2.0+
 
 Files: debian/patches/01_auto_ifup.patch
@@ -26,16 +26,12 @@ Files: debian/patches/03_man_pages.patch
 Copyright: 2002 David Kimdon <dwhedon@debian.org>
 License: GPL-2.0+
 
-Files: debian/patches/04_ignore_broadcasted_pado_packets.patch
-Copyright: 2005 Stephane Louise <luigi@nerim.net>
-License: GPL-2.0+
-
-Files: debian/patches/05_change_default_timeout.patch
+Files: debian/patches/04_change_default_timeout.patch
 Copyright: 2007 Andreas Barth <aba@not.so.argh.org>
 License: GPL-2.0+
 
-Files: debian/patches/06_typo_fixes.patch
-Copyright: 2016 Lee Garrett <lgarrett@rocketjump.eu>
+Files: debian/patches/05_typo_fixes.patch
+Copyright: 2016 Lee Garrett <debian@rocketjump.eu>
 License: GPL-2.0+
 
 License: GPL-2.0+
diff -pruN 3.12-1.2/debian/gbp.conf 3.15-1/debian/gbp.conf
--- 3.12-1.2/debian/gbp.conf	1970-01-01 00:00:00.000000000 +0000
+++ 3.15-1/debian/gbp.conf	2022-01-25 18:52:05.000000000 +0000
@@ -0,0 +1,7 @@
+# Configuration for git-buildpackage and affiliated tools
+
+[DEFAULT]
+debian-branch = master
+upstream-branch = upstream
+pristine-tar = True
+
diff -pruN 3.12-1.2/debian/patches/01_auto_ifup.patch 3.15-1/debian/patches/01_auto_ifup.patch
--- 3.12-1.2/debian/patches/01_auto_ifup.patch	2016-12-25 10:07:18.000000000 +0000
+++ 3.15-1/debian/patches/01_auto_ifup.patch	2022-01-25 20:34:36.000000000 +0000
@@ -7,24 +7,20 @@ Forwarded: no
 Reviewed-By: Christian Hudon <chrish@debian.org>
 Last-Update: 2016-06-21
 
-Index: rp-pppoe/src/Makefile.in
-===================================================================
---- rp-pppoe.orig/src/Makefile.in
-+++ rp-pppoe/src/Makefile.in
-@@ -85,7 +85,7 @@ pppoe-relay: relay.o if.o debug.o common
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -87,7 +87,7 @@
  	@CC@ -o $@ $^ $(LDFLAGS)
  
  pppoe.o: pppoe.c pppoe.h
--	@CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ $<
-+	@CC@ $(CFLAGS) -DAUTO_IFUP '-DVERSION="$(VERSION)"' -c -o $@ $<
+-	@CC@ $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -c -o $@ $<
++	@CC@ $(CFLAGS) -DAUTO_IFUP '-DRP_VERSION="$(RP_VERSION)"' -c -o $@ $<
  
  discovery.o: discovery.c pppoe.h
- 	@CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ $<
-Index: rp-pppoe/src/pppoe.c
-===================================================================
---- rp-pppoe.orig/src/pppoe.c
-+++ rp-pppoe/src/pppoe.c
-@@ -68,6 +68,48 @@ int optFloodDiscovery    = 0;   /* Flood
+ 	@CC@ $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -c -o $@ $<
+--- a/src/pppoe.c
++++ b/src/pppoe.c
+@@ -67,6 +67,48 @@
  				   USED FOR STRESS-TESTING ONLY.  DO NOT
  				   USE THE -F OPTION AGAINST A REAL ISP */
  
@@ -73,7 +69,7 @@ Index: rp-pppoe/src/pppoe.c
  PPPoEConnection *Connection = NULL; /* Must be global -- used
  				       in signal handler */
  
-@@ -601,6 +643,16 @@ main(int argc, char *argv[])
+@@ -605,6 +647,16 @@
  #endif
      }
  
diff -pruN 3.12-1.2/debian/patches/02_change_mac_option.patch 3.15-1/debian/patches/02_change_mac_option.patch
--- 3.12-1.2/debian/patches/02_change_mac_option.patch	2016-12-25 10:07:18.000000000 +0000
+++ 3.15-1/debian/patches/02_change_mac_option.patch	2022-01-25 20:34:36.000000000 +0000
@@ -1,5 +1,5 @@
 Description: Add option to change source MAC on Ethernet device
- This patch adds the -H option to pppoe, which allows to set the source MAC
+ This patch adds the -H option to pppoe, which allows setting the source MAC
  address on the Ethernet device pppoe is running over. Unconditionally sets
  the device to promiscuous mode.
 Author: Sven Geggus <sven@geggus.net>
@@ -8,11 +8,9 @@ Forwarded: no
 Reviewed-By: Andreas Barth <aba@not.so.argh.org>
 Last-Update: 2016-06-21
 
-Index: rp-pppoe/man/pppoe.8
-===================================================================
---- rp-pppoe.orig/man/pppoe.8
-+++ rp-pppoe/man/pppoe.8
-@@ -104,6 +104,19 @@ you are strongly recommended to use a \f
+--- a/man/pppoe.8
++++ b/man/pppoe.8
+@@ -104,6 +104,19 @@
  having to set the MTU on all the hosts on the LAN.
  
  .TP
@@ -32,13 +30,11 @@ Index: rp-pppoe/man/pppoe.8
  .B \-p \fIfile\fR
  Causes \fBpppoe\fR to write its process-ID to the specified file.  This
  can be used to locate and kill \fBpppoe\fR processes.
-Index: rp-pppoe/src/if.c
-===================================================================
---- rp-pppoe.orig/src/if.c
-+++ rp-pppoe/src/if.c
-@@ -458,9 +458,28 @@ openInterface(char const *ifname, UINT16
+--- a/src/if.c
++++ b/src/if.c
+@@ -461,9 +461,28 @@
      if (hwaddr) {
- 	strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
+ 	strlcpy(ifr.ifr_name, ifname, IFNAMSIZ);
  	if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) {
 +	  fatalSys("ioctl(SIOCGIFHWADDR)");
 +	}
@@ -66,19 +62,17 @@ Index: rp-pppoe/src/if.c
  #ifdef ARPHRD_ETHER
  	if (ifr.ifr_hwaddr.sa_family != ARPHRD_ETHER) {
  	    char buffer[256];
-Index: rp-pppoe/src/pppoe.c
-===================================================================
---- rp-pppoe.orig/src/pppoe.c
-+++ rp-pppoe/src/pppoe.c
-@@ -422,6 +422,7 @@ usage(char const *argv0)
+--- a/src/pppoe.c
++++ b/src/pppoe.c
+@@ -425,6 +425,7 @@
  	    "   -k             -- Kill a session with PADT (requires -e)\n"
  	    "   -d             -- Perform discovery, print session info and exit.\n"
  	    "   -f disc:sess   -- Set Ethernet frame types (hex).\n"
 +	    "   -H XX:XX:XX:XX:XX:XX -- Force Hardware Address (hex).\n"
  	    "   -h             -- Print usage information.\n\n"
- 	    "PPPoE Version %s, Copyright (C) 2001-2015 Roaring Penguin Software Inc.\n"
- 	    "PPPoE comes with ABSOLUTELY NO WARRANTY.\n"
-@@ -476,9 +477,9 @@ main(int argc, char *argv[])
+ 	    "RP-PPPoE Version %s, Copyright (C) 2001-2018 Roaring Penguin Software Inc.\n"
+ 	    "                 %*s  Copyright (C) 2018-2021 Dianne Skoll\n"
+@@ -480,9 +481,9 @@
      openlog("pppoe", LOG_PID, LOG_DAEMON);
  
  #ifdef DEBUGGING_ENABLED
@@ -90,7 +84,7 @@ Index: rp-pppoe/src/pppoe.c
  #endif
      while((opt = getopt(argc, argv, options)) != -1) {
  	switch(opt) {
-@@ -511,6 +512,18 @@ main(int argc, char *argv[])
+@@ -515,6 +516,18 @@
  	    Eth_PPPOE_Discovery = (UINT16_t) discoveryType;
  	    Eth_PPPOE_Session   = (UINT16_t) sessionType;
  	    break;
diff -pruN 3.12-1.2/debian/patches/03_man_pages.patch 3.15-1/debian/patches/03_man_pages.patch
--- 3.12-1.2/debian/patches/03_man_pages.patch	2016-12-25 10:07:18.000000000 +0000
+++ 3.15-1/debian/patches/03_man_pages.patch	2022-01-25 20:34:36.000000000 +0000
@@ -8,48 +8,40 @@ Forwarded: no
 Reviewed-By: Andreas Barth <aba@not.so.argh.org>
 Last-Update: 2016-06-21
 
-Index: rp-pppoe/man/pppoe-relay.8
-===================================================================
---- rp-pppoe.orig/man/pppoe-relay.8
-+++ rp-pppoe/man/pppoe-relay.8
-@@ -119,6 +119,4 @@ clients on the eth1, eth2 and eth3 netwo
- The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+--- a/man/pppoe-relay.8
++++ b/man/pppoe-relay.8
+@@ -119,6 +119,4 @@
+ The \fBpppoe\fR home page is \fIhttps://dianne.skoll.ca/projects/rp-pppoe/\fR.
  
  .SH SEE ALSO
 -pppoe-start(8), pppoe-stop(8), pppoe-connect(8), pppd(8), pppoe.conf(5),
 -pppoe(8), pppoe-setup(8), pppoe-status(8), pppoe-sniff(8), pppoe-server(8)
 -
 +pppd(8), pppoe(8), pppoe-sniff(8), pppoe-relay(8), /usr/share/doc/pppoe/README.Debian.gz
-Index: rp-pppoe/man/pppoe-server.8
-===================================================================
---- rp-pppoe.orig/man/pppoe-server.8
-+++ rp-pppoe/man/pppoe-server.8
-@@ -203,6 +203,4 @@ It is \fInot\fR a high-performance serve
- The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+--- a/man/pppoe-server.8
++++ b/man/pppoe-server.8
+@@ -214,6 +214,4 @@
+ The \fBpppoe\fR home page is \fIhttps://dianne.skoll.ca/projects/rp-pppoe/\fR.
  
  .SH SEE ALSO
 -pppoe-start(8), pppoe-stop(8), pppoe-connect(8), pppd(8), pppoe.conf(5),
 -pppoe(8), pppoe-setup(8), pppoe-status(8), pppoe-sniff(8), pppoe-relay(8)
 -
 +pppd(8), pppoe(8), pppoe-sniff(8), pppoe-relay(8), /usr/share/doc/pppoe/README.Debian.gz
-Index: rp-pppoe/man/pppoe-sniff.8
-===================================================================
---- rp-pppoe.orig/man/pppoe-sniff.8
-+++ rp-pppoe/man/pppoe-sniff.8
-@@ -72,6 +72,4 @@ exit.
- The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+--- a/man/pppoe-sniff.8
++++ b/man/pppoe-sniff.8
+@@ -67,6 +67,4 @@
+ The \fBpppoe\fR home page is \fIhttps://dianne.skoll.ca/projects/rp-pppoe/\fR.
  
  .SH SEE ALSO
 -pppoe-start(8), pppoe-stop(8), pppoe-connect(8), pppd(8), pppoe.conf(5),
 -pppoe(8), pppoe-setup(8), pppoe-status(8), pppoe-server(8), pppoe-relay(8)
 -
 +pppd(8), pppoe(8), pppoe-sniff(8), pppoe-relay(8), /usr/share/doc/pppoe/README.Debian.gz
-Index: rp-pppoe/man/pppoe.8
-===================================================================
---- rp-pppoe.orig/man/pppoe.8
-+++ rp-pppoe/man/pppoe.8
-@@ -252,5 +252,4 @@ with much inspiration from an earlier ve
- The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+--- a/man/pppoe.8
++++ b/man/pppoe.8
+@@ -252,5 +252,4 @@
+ The \fBpppoe\fR home page is \fIhttps://dianne.skoll.ca/projects/rp-pppoe/\fR.
  
  .SH SEE ALSO
 -pppoe-start(8), pppoe-stop(8), pppoe-connect(8), pppd(8), pppoe.conf(5), pppoe-setup(8), pppoe-status(8), pppoe-sniff(8), pppoe-server(8), pppoe-relay(8)
diff -pruN 3.12-1.2/debian/patches/04_change_default_timeout.patch 3.15-1/debian/patches/04_change_default_timeout.patch
--- 3.12-1.2/debian/patches/04_change_default_timeout.patch	1970-01-01 00:00:00.000000000 +0000
+++ 3.15-1/debian/patches/04_change_default_timeout.patch	2022-01-25 20:34:36.000000000 +0000
@@ -0,0 +1,25 @@
+Description: retry indefinitely while re-connecting
+ When connecting, do not give up after 30 seconds, but try indefinetely. That
+ way a temporarily unavailable DSLAM will not leave the system disconnected.
+Author: Andreas Barth <aba@not.so.argh.org>  
+Bug-Debian: https://bugs.debian.org/159803
+Bug-Debian: https://bugs.debian.org/222746
+Bug-Debian: https://bugs.debian.org/251261
+Bug-Debian: https://bugs.debian.org/320676
+Bug-Debian: https://bugs.debian.org/222746
+Bug-Debian: https://bugs.debian.org/230707
+Forwarded: no
+Reviewed-By: Andreas Barth <aba@not.so.argh.org>
+Last-Update: 2016-06-21
+
+--- a/configs/pppoe.conf
++++ b/configs/pppoe.conf
+@@ -67,7 +67,7 @@
+ # to connect forever after pppoe-start is called.  Otherwise, it will
+ # give out after CONNECT_TIMEOUT seconds and will not attempt to
+ # connect again, making it impossible to reach.
+-CONNECT_TIMEOUT=30
++CONNECT_TIMEOUT=0
+ 
+ # How often in seconds pppoe-start polls to check if link is up
+ CONNECT_POLL=2
diff -pruN 3.12-1.2/debian/patches/04_ignore_broadcasted_pado_packets.patch 3.15-1/debian/patches/04_ignore_broadcasted_pado_packets.patch
--- 3.12-1.2/debian/patches/04_ignore_broadcasted_pado_packets.patch	2016-12-25 10:07:18.000000000 +0000
+++ 3.15-1/debian/patches/04_ignore_broadcasted_pado_packets.patch	1970-01-01 00:00:00.000000000 +0000
@@ -1,24 +0,0 @@
-Description: Ignore broadcasted PADO-packets
- Ignore broadcasted PADO-packets instead of packets from non-unique source
- address.
-Author: Stephane Louise <luigi@nerim.net>
-Bug-Debian: https://bugs.debian.org/293811
-Forwarded: no
-Reviewed-By: Andreas Barth <aba@not.so.argh.org>
-Last-Update: 2016-06-20
-
-Index: rp-pppoe/src/discovery.c
-===================================================================
---- rp-pppoe.orig/src/discovery.c
-+++ rp-pppoe/src/discovery.c
-@@ -472,8 +472,8 @@ waitForPADO(PPPoEConnection *conn, int t
- 	if (!packetIsForMe(conn, &packet)) continue;
- 
- 	if (packet.code == CODE_PADO) {
--	    if (NOT_UNICAST(packet.ethHdr.h_source)) {
--		printErr("Ignoring PADO packet from non-unicast MAC address");
-+	    if (BROADCAST(packet.ethHdr.h_source)) {
-+		printErr("Ignoring broadcast PADO packet");
- 		continue;
- 	    }
- #ifdef PLUGIN
diff -pruN 3.12-1.2/debian/patches/05_change_default_timeout.patch 3.15-1/debian/patches/05_change_default_timeout.patch
--- 3.12-1.2/debian/patches/05_change_default_timeout.patch	2016-12-25 10:07:18.000000000 +0000
+++ 3.15-1/debian/patches/05_change_default_timeout.patch	1970-01-01 00:00:00.000000000 +0000
@@ -1,25 +0,0 @@
-Description: retry indefinitely while re-connecting
- When connecting, do not give up after 30 seconds, but try indefinetely. That
- way a temporarily unavailable DSLAM will not leave the system disconnected.
-Author: Andreas Barth <aba@not.so.argh.org>  
-Bug-Debian: https://bugs.debian.org/159803
-Bug-Debian: https://bugs.debian.org/222746
-Bug-Debian: https://bugs.debian.org/251261
-Bug-Debian: https://bugs.debian.org/320676
-Bug-Debian: https://bugs.debian.org/222746
-Bug-Debian: https://bugs.debian.org/230707
-Forwarded: no
-Reviewed-By: Andreas Barth <aba@not.so.argh.org>
-Last-Update: 2016-06-21
-
---- rp-pppoe-3.12.orig/configs/pppoe.conf
-+++ rp-pppoe-3.12/configs/pppoe.conf
-@@ -66,7 +66,7 @@ DEFAULTROUTE=yes
- # to connect forever after pppoe-start is called.  Otherwise, it will
- # give out after CONNECT_TIMEOUT seconds and will not attempt to
- # connect again, making it impossible to reach.
--CONNECT_TIMEOUT=30
-+CONNECT_TIMEOUT=0
- 
- # How often in seconds pppoe-start polls to check if link is up
- CONNECT_POLL=2
diff -pruN 3.12-1.2/debian/patches/05_typo_fixes.patch 3.15-1/debian/patches/05_typo_fixes.patch
--- 3.12-1.2/debian/patches/05_typo_fixes.patch	1970-01-01 00:00:00.000000000 +0000
+++ 3.15-1/debian/patches/05_typo_fixes.patch	2022-01-25 20:34:36.000000000 +0000
@@ -0,0 +1,18 @@
+Description: Typo fix
+Author: Lee Garrett <debian@rocketjump.eu>
+Bug-Debian: https://bugs.debian.org/426621
+Forwarded: no
+Reviewed-By: Andreas Barth <aba@not.so.argh.org>
+Last-Update: 2016-06-21
+
+--- a/man/pppoe.conf.5
++++ b/man/pppoe.conf.5
+@@ -57,7 +57,7 @@
+ .B NONROOT
+ If the line \fBNONROOT=OK\fR (exactly like that; no whitespace or comments)
+ appears in the configuration file, then \fBpppoe-wrapper\fR will allow
+-non-root users to bring the conneciton up or down.  The wrapper is installed
++non-root users to bring the connection up or down.  The wrapper is installed
+ only if you installed the rp-pppoe-gui package.
+ 
+ .TP
diff -pruN 3.12-1.2/debian/patches/06_typo_fixes.patch 3.15-1/debian/patches/06_typo_fixes.patch
--- 3.12-1.2/debian/patches/06_typo_fixes.patch	2016-12-25 10:07:18.000000000 +0000
+++ 3.15-1/debian/patches/06_typo_fixes.patch	1970-01-01 00:00:00.000000000 +0000
@@ -1,20 +0,0 @@
-Description: Typo fix
-Author: Lee Garrett <lgarrett@rocketjump.eu>
-Bug-Debian: https://bugs.debian.org/426621
-Forwarded: no
-Reviewed-By: Andreas Barth <aba@not.so.argh.org>
-Last-Update: 2016-06-21
-
-Index: rp-pppoe/doc/HOW-TO-CONNECT
-===================================================================
---- rp-pppoe.orig/doc/HOW-TO-CONNECT
-+++ rp-pppoe/doc/HOW-TO-CONNECT
-@@ -27,7 +27,7 @@ should display something like this:
- 
- 	eth0      Link encap:Ethernet  HWaddr 00:60:67:62:31:D4
- 
--plust some more lines.  Your HWaddr will be different.  As long as you see
-+plus some more lines.  Your HWaddr will be different.  As long as you see
- the HWaddr line, your card should be working.
- 
- DO NOT assign an IP address to the Ethernet card.  DO NOT configure the
diff -pruN 3.12-1.2/debian/patches/07_pppoestart-echo.patch 3.15-1/debian/patches/07_pppoestart-echo.patch
--- 3.12-1.2/debian/patches/07_pppoestart-echo.patch	2018-12-02 15:31:44.000000000 +0000
+++ 3.15-1/debian/patches/07_pppoestart-echo.patch	1970-01-01 00:00:00.000000000 +0000
@@ -1,166 +0,0 @@
-From: Andreas Henriksson <andreas@fatal.se>
-Subject: Avoid useless indirection and full path embedding of echo
-
-Embedding the full path of echo at build-time, instead of relying
-on PATH at *runtime* seems pointless. Spawning a command rather than
-using using plain echo which is often a shell-builtin is wasteful.
-
-The script also doesn't even consistently use $ECHO, but atleast
-in one place already uses plain echo.
-
-Thus this patch just drops the entire indirection.
-(Even better would be to join the gazillion echos run one after the
-other into a single write.)
-
-Apart from generally being a sane thing to do, this patch fixes
-the reproducible build failure on merged-usr vs non-merged systems
-as was spotted at:
-https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/rp-pppoe.html
-
-
-Index: rp-pppoe-3.12/scripts/pppoe-start.in
-===================================================================
---- rp-pppoe-3.12.orig/scripts/pppoe-start.in
-+++ rp-pppoe-3.12/scripts/pppoe-start.in
-@@ -28,7 +28,6 @@ exec_prefix=@exec_prefix@
- 
- # Paths to programs
- CONNECT=@sbindir@/pppoe-connect
--ECHO=@ECHO@
- IFCONFIG=/sbin/ifconfig
- 
- # Set to "C" locale so we can parse messages from commands
-@@ -42,63 +41,63 @@ ETH=""
- ME=`basename $0`
- # Must be root
- if [ "`@ID@ -u`" != 0 ] ; then
--    $ECHO "$ME: You must be root to run this script" >& 2
-+    echo "$ME: You must be root to run this script" >& 2
-     exit 1
- fi
- 
- # Debugging
- if [ "$DEBUG" = "1" ] ; then
--    $ECHO "*** Running in debug mode... please be patient..."
-+    echo "*** Running in debug mode... please be patient..."
-     DEBUG=/tmp/pppoe-debug-$$
-     export DEBUG
-     mkdir $DEBUG
-     if [ "$?" != 0 ] ; then
--	$ECHO "Could not create directory $DEBUG... exiting"
-+	echo "Could not create directory $DEBUG... exiting"
- 	exit 1
-     fi
-     DEBUG=$DEBUG/pppoe-debug.txt
- 
-     # Initial debug output
--    $ECHO "---------------------------------------------" > $DEBUG
--    $ECHO "* The following section contains information about your system" >> $DEBUG
-+    echo "---------------------------------------------" > $DEBUG
-+    echo "* The following section contains information about your system" >> $DEBUG
-     date >> $DEBUG
--    $ECHO "Output of uname -a" >> $DEBUG
-+    echo "Output of uname -a" >> $DEBUG
-     uname -a >> $DEBUG
--    $ECHO "---------------------------------------------" >> $DEBUG
--    $ECHO "* The following section contains information about your network" >> $DEBUG
--    $ECHO "* interfaces.  The one you chose for PPPoE should contain the words:" >> $DEBUG
--    $ECHO "* 'UP' and 'RUNNING'.  If it does not, you probably have an Ethernet" >> $DEBUG
--    $ECHO "* driver problem." >> $DEBUG
--    $ECHO "Output of ifconfig -a" >> $DEBUG
-+    echo "---------------------------------------------" >> $DEBUG
-+    echo "* The following section contains information about your network" >> $DEBUG
-+    echo "* interfaces.  The one you chose for PPPoE should contain the words:" >> $DEBUG
-+    echo "* 'UP' and 'RUNNING'.  If it does not, you probably have an Ethernet" >> $DEBUG
-+    echo "* driver problem." >> $DEBUG
-+    echo "Output of ifconfig -a" >> $DEBUG
-     $IFCONFIG -a >> $DEBUG
--    $ECHO "---------------------------------------------" >> $DEBUG
-+    echo "---------------------------------------------" >> $DEBUG
-     if [ "`uname -s`" = "Linux" ] ; then
--        $ECHO "* The following section contains information about kernel modules" >> $DEBUG
--	$ECHO "* If the module for your Ethernet card is 'tulip', you might" >> $DEBUG
--	$ECHO "* want to look for an updated version at http://www.scyld.com" >> $DEBUG
--	$ECHO "Output of lsmod" >> $DEBUG
-+        echo "* The following section contains information about kernel modules" >> $DEBUG
-+	echo "* If the module for your Ethernet card is 'tulip', you might" >> $DEBUG
-+	echo "* want to look for an updated version at http://www.scyld.com" >> $DEBUG
-+	echo "Output of lsmod" >> $DEBUG
- 	lsmod >> $DEBUG
--	$ECHO "---------------------------------------------" >> $DEBUG
-+	echo "---------------------------------------------" >> $DEBUG
-     fi
--    $ECHO "* The following section lists your routing table." >> $DEBUG
--    $ECHO "* If you have an entry which starts with '0.0.0.0', you probably" >> $DEBUG
--    $ECHO "* have defined a default route and gateway, and pppd will" >> $DEBUG
--    $ECHO "* not create a default route using your ISP.  Try getting" >> $DEBUG
--    $ECHO "* rid of this route." >> $DEBUG
--    $ECHO "Output of netstat -n -r" >> $DEBUG
-+    echo "* The following section lists your routing table." >> $DEBUG
-+    echo "* If you have an entry which starts with '0.0.0.0', you probably" >> $DEBUG
-+    echo "* have defined a default route and gateway, and pppd will" >> $DEBUG
-+    echo "* not create a default route using your ISP.  Try getting" >> $DEBUG
-+    echo "* rid of this route." >> $DEBUG
-+    echo "Output of netstat -n -r" >> $DEBUG
-     netstat -n -r >> $DEBUG
--    $ECHO "---------------------------------------------" >> $DEBUG
--    $ECHO "Contents of /etc/resolv.conf" >> $DEBUG
--    $ECHO "* The following section lists DNS setup." >> $DEBUG
--    $ECHO "* If you can browse by IP address, but not name, suspect" >> $DEBUG
--    $ECHO "* a DNS problem." >> $DEBUG
-+    echo "---------------------------------------------" >> $DEBUG
-+    echo "Contents of /etc/resolv.conf" >> $DEBUG
-+    echo "* The following section lists DNS setup." >> $DEBUG
-+    echo "* If you can browse by IP address, but not name, suspect" >> $DEBUG
-+    echo "* a DNS problem." >> $DEBUG
-     cat /etc/resolv.conf >> $DEBUG
--    $ECHO "---------------------------------------------" >> $DEBUG
--    $ECHO "* The following section lists /etc/ppp/options." >> $DEBUG
--    $ECHO "* You should have NOTHING in that file." >> $DEBUG
--    $ECHO "Contents of /etc/ppp/options" >> $DEBUG
-+    echo "---------------------------------------------" >> $DEBUG
-+    echo "* The following section lists /etc/ppp/options." >> $DEBUG
-+    echo "* You should have NOTHING in that file." >> $DEBUG
-+    echo "Contents of /etc/ppp/options" >> $DEBUG
-     cat /etc/ppp/options >> $DEBUG 2>/dev/null
--    $ECHO "---------------------------------------------" >> $DEBUG
-+    echo "---------------------------------------------" >> $DEBUG
- else
-     DEBUG=""
- fi
-@@ -114,7 +113,7 @@ case "$#" in
- esac
- 
- if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
--    $ECHO "$ME: Cannot read configuration file '$CONFIG'" >& 2
-+    echo "$ME: Cannot read configuration file '$CONFIG'" >& 2
-     exit 1
- fi
- export CONFIG
-@@ -134,7 +133,7 @@ if [ -r "$PIDFILE" ] ; then
-     # Check if still running
-     kill -0 $PID > /dev/null 2>&1
-     if [ $? = 0 ] ; then
--	$ECHO "$ME: There already seems to be a PPPoE connection up (PID $PID)" >& 2
-+	echo "$ME: There already seems to be a PPPoE connection up (PID $PID)" >& 2
- 	exit 1
-     fi
-     # Delete bogus PIDFILE
-@@ -169,7 +168,7 @@ while [ true ] ; do
-     # Looks like the interface came up
-     if [ $? = 0 ] ; then
- 	# Print newline if standard input is a TTY
--	tty -s && $ECHO " Connected!"
-+	tty -s && echo " Connected!"
- 	exit 0
-     fi
- 
-@@ -185,7 +184,7 @@ while [ true ] ; do
-     fi
- done
- 
--$ECHO "TIMED OUT" >& 2
-+echo "TIMED OUT" >& 2
- # Timed out!  Kill the pppoe-connect process and quit
- kill $CONNECT_PID > /dev/null 2>&1
- 
diff -pruN 3.12-1.2/debian/patches/series 3.15-1/debian/patches/series
--- 3.12-1.2/debian/patches/series	2018-12-02 15:24:34.000000000 +0000
+++ 3.15-1/debian/patches/series	2022-01-25 20:34:36.000000000 +0000
@@ -1,7 +1,6 @@
 01_auto_ifup.patch
 02_change_mac_option.patch
 03_man_pages.patch
-04_ignore_broadcasted_pado_packets.patch
-05_change_default_timeout.patch
-06_typo_fixes.patch
-07_pppoestart-echo.patch
+04_change_default_timeout.patch
+05_typo_fixes.patch
+#06_pppoestart-echo.patch
diff -pruN 3.12-1.2/debian/pppoe.lintian-overrides 3.15-1/debian/pppoe.lintian-overrides
--- 3.12-1.2/debian/pppoe.lintian-overrides	2016-12-25 10:07:18.000000000 +0000
+++ 3.15-1/debian/pppoe.lintian-overrides	2022-01-25 20:34:43.000000000 +0000
@@ -1,6 +1,6 @@
 # Shipping with setuid is intentional to allow unprivileged users belonging
 # to the dip group to dial in.
-pppoe binary: setuid-binary usr/sbin/pppoe 4754 root/dip
+pppoe binary: elevated-privileges usr/sbin/pppoe 4754 root/dip
 
 # This file in not world-readable because it usually contains login credentials
 # from the DSL provider that need to be protected.
diff -pruN 3.12-1.2/debian/upstream/signing-key.asc 3.15-1/debian/upstream/signing-key.asc
--- 3.12-1.2/debian/upstream/signing-key.asc	2016-12-25 10:07:18.000000000 +0000
+++ 3.15-1/debian/upstream/signing-key.asc	2022-01-25 19:07:43.000000000 +0000
@@ -1,32 +1,51 @@
 -----BEGIN PGP PUBLIC KEY BLOCK-----
 
-mQGiBEGygLIRBACnxLDlTGatc7F9d7o/7q+adyomRJOhmssfgTAZouc7NXbUi4yK
-W7rzj7AOgySBIXFszuSoruT9pFdY4RS7qvA4MOe/gsBkxHS1kL86NDpvngw6LEKA
-AlaldzZa4NZtyhg4JAyjQY18wCbd9qosrsy9dHhKgojFRGlTAGEsgKGmUwCgvrn2
-KDKXfhbnjnPP9XAOIPVNWVcD/iOyiYcmMaM26Jx3xr9ST7GUuPaed7gPn62cpsRV
-g/IDwKYC13yk0PVd8mccPW7ZzdeVgNe8bx3UpBGkGeXJt8CWzi13y9cUy7SXIB7b
-VcilZl7bBcdIClIYIgJCZ/2ecu0L9Zt4HkX1vw1LhDHhsao+XhBxyk6hGCnNC62d
-Cp9+A/9pvgaNV35WXtiNKVhOGHvlHSnZbU4Tip3avNq328SjPjN0P8yW9W5cTQv8
-6UTuYi//U6Xj1fmN6b/UFJeJf2lPz0Jx2UFb83DXCd6PVPvb/M+odfAV2GKPvpiM
-jYkivpVqg/lxYR9il0rDgl2c5zyJscdJulfLw/v4xShPKWp6OrQlRGlhbm5lIFNr
-b2xsIDxkZnNAcm9hcmluZ3Blbmd1aW4uY29tPohiBBMRAgAiBQJVNo4XAhsjBgsJ
-CAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRDBhC4qEm9C4AzHAKCGyrnzJ0alGMqT
-ufqdDEw8hqA0zACfQN4ebO2We4kCuYtvCj1GX590wEm0NkRhdmlkIEYuIFNrb2xs
-IChLZXkgZm9yIDIwMDUpIDxkZnNAcm9hcmluZ3Blbmd1aW4uY29tPohbBBMRAgAb
-BQJBsoCyBgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJEMGELioSb0Lgb34Anj14XFGj
-cIPl41SWWbIHQVPhzqdzAJ92n9NfTUIXMoC7DsJzd+AUGxhFxrkCDQRBsoDKEAgA
-iu7mXd6jlcbPS0DdZt8FZBaib+5rEcB/tGzwuSe70xhB1Ipr12Nj2xA/y2Aw9Ypp
-/pY0c4B+7XQGme/RH1AevNzXPIv115XhaydjQX16Ns8kme1KMFERg175PmL2ybtj
-xnQm3O2uhtjJHPaJteu7Htailqi0eUF+LGzy3UVbS8XPWpDzWoudFt91jQGFzMhV
-lbcSJl6mPbW7q9QG0m8b7FFJj9ixofcyLKELWeoqNYuqiiWhRYfYnqCSiTfvi5FF
-35yRaa+xFvamBUvBZCd/pvFVoTSb169gkvyAX9p5OFgph7N365gqbrMwo+dt4FZE
-ymdw/VhjwQdUBpqCZN4wrwADBQf9GtmDn/n+F2ZqzjHB/iG+314Xk+r5+BKUlF0b
-76SmL8G61pDQa8QXz69ZQJXjfj05rbCiKLmnbaMh4sH3TX8gXKG+UmQIsS1Sudgz
-ZDETzjXP+alzrbYYwZ3TjoF8Y+8RzsM+S3V4eqqhthlbMyx+3ke0CfqcffleV+hC
-OA7YpVmaSYxg7BO1QPTLtYLvuE2V0QPoOlzlJAf3vpG9Lk8279jQM0KKZSRgF03O
-9POhQuvYjSep3xRZh0CaTyfwY5s2w/NrADXVmlpSjFx6ad8n6SpAaNN+LvshPe2y
-QJyikArBMsGZQ2wc1fq0mhXbFQyR7/MvyzKzmnh3I+XCAAs+8YhGBBgRAgAGBQJB
-soDKAAoJEMGELioSb0Lg35cAn365z1N8MGLi/D87ntdAdvy7v3tYAJ4lzQbaNPGM
-s8v9QOGz3mEabXxB7g==
-=PunN
+mQINBFr4qtsBEADTaw+EQkEuzRlrO4bIFizdSv8Zkk5zqBPOGb1BIGTusGnD0eYf
+W/CHhNrZUhwgx+UuBZnJPh1qvMj6vhNk6pwQatzzWnIzi+M3oqx1iDZRpPrpsVef
+tQepONopinc89Kmlh12ngF/ACshpSEKmPs1p0JZwuYc7L11TO1eBmYWXsr/4L1GR
+jfK5tEZ2Oi+PAj3XyPaeBC1vrzOzf+S7cvqQPWUa7gEYKWqlKd9Y4dINS5S2SWQI
+8WdyZg+SnH37ZkvdKXEu+911Onr5IeFWM9KirUzZ3N36QIyeg0scWDYbjPN1Rg28
+xRPpdN6JHknnrA2KOQOWlJ+cSKqfE9sLeeBy7cw9NhT9s6iglVKeB48BCyCA1j+6
+AzFt+FgbSJa7pTkaLxSm4oGN5hC6bRhXWe7Wd0TNAtfa/afDmuhGb0A4BtKRQpke
++jrTSFtkXdBDFfRUKZUordmiA/erdovQZf8A1ZNeY2GeLm4sNbOFHHThax2sX/0o
+7iuEMyGhVouV8GXLt+DHkuHxCzTOxLorn++WwCI+DB+cH6SXWTY1xA5DooNwT/0t
+8oh3TRxGUY54uRffz73t8HhzwLIrPV8LYIqPqXAdQtUbwF7NFz8ug87+poMKtwS/
+N5Yds2dLlk0MYY54QRjjinD4XIVoPnDIfs65mfmOjMHKC+XwirlxiAmYzwARAQAB
+tB5EaWFubmUgU2tvbGwgPGRpYW5uZUBza29sbC5jYT6JAk4EEwEIADgWIQRzjk2V
+QFKQLBR9B7JoWlpeUR0w4gUCWviq2wIbAwULCQgHAgYVCAkKCwIEFgIDAQIeAQIX
+gAAKCRBoWlpeUR0w4jUWD/4pUtm271kbwZo6pJsMyM8FEbYdPh3h/y4s9nicuorg
+y/tsStXDNf/juNsYqb4qOvbXphTZhIK8YqlV585EO1s4VcFfJSVypgVijbLuqZkv
+nHQcp9C93z6Ye5EvogPsmbd8d4qViPTzaQLOgua3TagKOm1FU5qFMV9JfY0MZWeQ
+q3agA8tNoyJl3y4/JusOxQ+hRVoL71cEiW6v5L1ruj/jIXTSkJlzJNPNe9CIXNz1
+5cJ9OZLiYtBPIG90mugAr5LiuSZfFBQAxLECpScFze1FZ5DfQ/p7Rk4BX2tlFn7L
+ggBma4EOj5bdsSv21to/IdhyqqZIUMrrI8hAmdT11N38vH4FjMJnyzvF/Df2ZI18
+rZAoUQVXo6sFx5m3cC4qufoAVEXCNGjlia7kE6cU7zAisD2VCmkDZ8FqOP5KvJMm
+C5RLDc3O60xihiogf90IzRW4p/MOrwe9E650IO58CusOt5PvJTxSa0H6EMPpHfhT
+INhHc7icLLyS6JN6PTtVAnazM4M2/37YvhhQghQY8uq9HJg9IMOLO7NghU1CEZHd
+O3bT4QzQBaKBrphyDdWcbt8gJP3q3bWi5+hWnL+mQ2hWzoH4NAftgRQzol4AUZfP
+ourm+4PUOizvNfjqkUyV2nYtaYmcNelWqDdJlMn9U/F2mlWCNiDOIZ415HG0SEDB
+SLkCDQRa+KrbARAAvp1PM+jZh7mjoA9JpWW1pdmWsjinZFFvm6fOatV+5MVtlEXJ
+luZZ+1GFPkU8uJSAmjgo+nBA4U/zU3o+/7lqIdaqEubxmUSazHpPL265r19w/fuE
+dkfHP31Q+G7su4XfkE8gEpJ+BIrYll9Zu9Mu/1wfI+IT8lgUw1/u1iG3bJYSDqIL
+6RAOE/k+y7hHgr4VBsKGj5lAOHDM3O61TRw5lqedcZyERlLqFM/ZykRt5us7qsUW
+DvvaAOW3xRzGott1eghlJnIAcut+G6nXP6Rg1vrCWfEDx5eTbm8uevCQ96PZ0Sj6
+7YEy5/BZdzb8+wAy06oAy8TXd39BWLFp9CxEbk0PONHx5dMrf1Irtct/Hzftc/3/
+ATKksKD4JvaQcT1s0wgZQ/Hmxzi8SKTF2/UarZLmFmDCdFcVcfH5vDkR9rFZzEYW
+XLaCqMt2XOxYMkA4mt9nihVJLJdzxg4Ul4quVDQM5KZlPHhxI+dRljNsOF50vCVp
+TLU9u3napuijXPwoGfol56gB3owhNDNNsIkuMKkpqrooSnL8DIXoWBbpzIOVryid
+Jp0tNEX6Y4FW8WC10kSjB0JrL/nQAjZ/eA71o+ayzHpkkYnua3lt2kgCRQdP3S8D
+RYQMwjpQ/Y6MwhUqS8uwqAjy4WxkMNNHq/gOzIBRqsrvPpRd33Cje9JLKrUAEQEA
+AYkCNgQYAQgAIBYhBHOOTZVAUpAsFH0HsmhaWl5RHTDiBQJa+KrbAhsMAAoJEGha
+Wl5RHTDi29gQAIeqK8KXaXYkcR+9Fu42sf56mzCX5dGCRNgbrgdGqDE2n8UDUEAu
+ESbu4XBde8u5oX8nekjm4eoEmlu3pgTtSnanZWAeYAAwDMjMwT5F5QBCeipdeIQ4
+fS4SFzWFoa6O98zxsCMJ2Jm6khPVe5mYCQAwU3Le1uKu4a+jLjbkV2ygzI6gnLdd
+NpjZdvBYkvZroicyDpmPsNZ95Xpiw8V51qUAh++ooWdhtNOmnPnh0rF53tNT0Opa
+NDDTs81Qd0JujGVWUsKly6eLEKnwnNm66VP2uvw2qselUS14mxpLEzKQuWGOx0tv
+9YZMOB8Ue5fVvSghGHkaDP6Qi9VeWT4e8bm915XSZJjF0xOIz43DEOiK2AefzGRF
+6DV6bbE5iyZbQhJRh3lykd1jzLWqy/+KWcabg8hLN5UO1bi0orDnhH3DzjaTQ8yL
+YS1qL3Mxmxy5av6kk18ELKr5ujopyqiQWcszWlBPi0yB1/DehnlBAEps2CVi9Bdy
+FM2Zl0sfwZuejoaAEpDsmgRZbCp+L0BYgQh7+ZmGPi4K6kntmF+6gyBN7VwgLqpX
+429f/stzz6lhhvWhJmJodtCAmPqfyE4LDr+lbXGxwBYDMZXa+RNmf8ERLTWoUOe+
+gWz4GtVme7qNC46Km9/0RYHQddll4OOKYr7e4tCb57P7jH8ZxhSMpArf
+=zEGD
 -----END PGP PUBLIC KEY BLOCK-----
diff -pruN 3.12-1.2/debian/watch 3.15-1/debian/watch
--- 3.12-1.2/debian/watch	2016-12-25 10:07:18.000000000 +0000
+++ 3.15-1/debian/watch	2022-01-25 18:52:05.000000000 +0000
@@ -1,3 +1,5 @@
-version=3
-opts=pgpsigurlmangle=s/$/.sig/ https://www.roaringpenguin.com/products/pppoe /files/download/rp-pppoe-(.+).tar.gz
-
+version=4
+opts="pgpsigurlmangle=s%$%.sig%" \
+    https://dianne.skoll.ca/projects/rp-pppoe/ \
+    /projects/rp-pppoe/download/rp-pppoe-(.+).tar.gz \
+    debian uupdate
diff -pruN 3.12-1.2/doc/CHANGES 3.15-1/doc/CHANGES
--- 3.12-1.2/doc/CHANGES	2015-11-11 15:10:00.000000000 +0000
+++ 3.15-1/doc/CHANGES	2021-05-07 13:18:00.000000000 +0000
@@ -1,4 +1,69 @@
 # LIC: GPL
+
+Changes from version 3.14 to 3.15:
+
+- Release 3.15 (2021-05-07)
+
+- src/pppoe.c: Don't ignore SIGTERM and SIGINT.  Send PADT and exit
+  if one of those signals is received.
+
+- General: Switch from net-tools (ifconfig and friends) to iproute2 (ip ...)
+  on Linux.
+
+Changes from version 3.13 to 3.14:
+
+- Release 3.14 (2020-05-26)
+
+- Delete scripts/pppoe-init-turbolinux.in - TurboLinux is defunct.
+
+- pppoe-server: Add -H and -M options for sending HURL and MOTM packets
+  respectively.
+
+- Change VERSION macro to RP_VERSION to avoid conflict with pppd macro.
+
+- Apply all of the patches at
+  https://github.com/nabijaczleweli/rp-pppoe/tree/patches/0006-touchups-3.14-BETA-2-v1
+  which fix up various compile-time warnings.
+
+- Apply all of the patches at
+  https://github.com/nabijaczleweli/rp-pppoe/tree/patches/0004-mostly-cosmetic-3.14-BETA-1-v1
+  which implement the following 6 changes:
+
+- 1. Clarify a couple of comments
+- 2. Remove the '@' before the command that installs the plugin, in the Makefile
+- 3. Fix a typo in doc/HOW-TO-CONNECT
+- 4. Use echo instead of /bin/echo in scripts
+- 5. Fix potential snprintf(...) truncation
+- 6. Cosmetic fix to copyright printout
+
+- Apply all the patches at
+  https://github.com/nabijaczleweli/rp-pppoe/tree/patches/0002-pppd-bugfixes-3.13-v1
+  which implement the following 13 changes:
+
+- 1. Don't exit if we time out waiting for PADO/PADS packets if
+  persist option set
+- 2. Remove unused variable
+- 3. Don't error out if device is not Ethernet if doit is 0 in PPPoEDevnameHook
+- 4. Use one 8-bit bitfield and macros for both ver and type in PPPoEPacket
+- 5. Remove unnecessary casts from common.c
+- 6. Replace strDup() with POSIX strdup(3)
+- 7. Extract expiration check into time_left() function
+- 8. Suppress false error message on PPPoE disconnect
+- 9. Send PADT on PPPoE disconnect
+- 10. Various fixes for errors found by coverity static analysis
+- 11. Remove all references to cdefs.h
+- 12. Eliminate snprintf-related compiler warning in plugin.c
+- 13. Make tag parsing loop condition more accurate
+
+Changes from version 3.12 to 3.13:
+
+- Release 3.13 (2018-11-25)
+
+- Fix potential use-after-free bug
+
+- Properly detecte kernel-mode PPPoE; fix compilation problems on
+  Debian Jessie and Debian Stretch.
+
 Changes from version 3.11 to 3.12:
 
 - Update author's name to "Dianne Skoll"
diff -pruN 3.12-1.2/doc/HOW-TO-CONNECT 3.15-1/doc/HOW-TO-CONNECT
--- 3.12-1.2/doc/HOW-TO-CONNECT	2015-11-11 15:10:00.000000000 +0000
+++ 3.15-1/doc/HOW-TO-CONNECT	2021-05-07 13:18:00.000000000 +0000
@@ -21,14 +21,15 @@ visible to the Linux kernel.  Just how t
 of this document.  However, if the card is the only Ethernet card in
 the system, executing:
 
-	ifconfig eth0
+	ip link show eth0
 
 should display something like this:
 
-	eth0      Link encap:Ethernet  HWaddr 00:60:67:62:31:D4
+	2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
+    link/ether fc:aa:15:39:a7:b3 brd ff:ff:ff:ff:ff:ff
 
-plust some more lines.  Your HWaddr will be different.  As long as you see
-the HWaddr line, your card should be working.
+Your second line will most definately be different.  As long as you see
+the link/ether line, your card should be working.
 
 DO NOT assign an IP address to the Ethernet card.  DO NOT configure the
 card to come up at boot time.
@@ -119,8 +120,8 @@ hosts to the LAN, but consumes some extr
 
 If you want to manually configure the LAN hosts, here's how:
 
-In Linux, use: "ifconfig eth0 mtu 1452".  For best results, put this
-in an /etc/rc.d/rc.local script.
+In Linux, use: "ip link set eth0 mtu 1452".  For best results, put
+this in an /etc/rc.d/rc.local script.
 
 For Windows, machines, see http://lan.cns.ksu.edu/OS/WIN95/slip95.htm.
 Set the MaxMTU to 1452.
@@ -134,8 +135,8 @@ As root, bring down the link by typing:
 That's it!
 
 --
-Dianne Skoll <dfs@roaringpenguin.com> | Roaring Penguin Software Inc.
-http://www.roaringpenguin.com           |
+Dianne Skoll <dianne@skoll.ca>
+https://dianne.skoll.ca/projects/rp-pppoe/           |
 
 PROBLEMS!  DIANNE, IT DOESN'T WORK!
 ---------------------------------
@@ -145,11 +146,13 @@ Here are some problems PPPoE users have
 -----------------------------------------------------------------------------
 A) Can't see the Ethernet interface
 
-Well, I can't really help you here.  To use these instructions, you must
-have Linux working to the point where it recognizes your Ethernet card.
-If you type "ifconfig ethx" and you get back a HWAddr value, your Ethernet
-card is probably OK.  But I really can't help with hardware configuration
-issues.
+Well, I can't really help you here.  To use these instructions, you
+must have Linux working to the point where it recognizes your Ethernet
+card.  If you type "ip link show ethx" and you get back a hardware
+address value in the line that begins with link/ether, your Ethernet
+card is probably OK.  But I really can't help with hardware
+configuration issues.
+
 
 -----------------------------------------------------------------------------
 B) Connection seems to come up, but I can't browse the web or ping anything
@@ -224,9 +227,10 @@ problem, give the Ethernet card connecte
 address.  For example, if eth0 is your internal LAN card and eth1 goes to
 the DSL modem, do something like this:
 
-	ifconfig eth1 10.0.0.1 netmask 255.255.255.0
+	ip link set eth1 10.0.0.1/24
+
+(You may have to choose a different IP address and prefix; experiment.)
 
-(You may have to choose a different IP address; experiment.)
 -----------------------------------------------------------------------------
 K) How can I run a script every time I connect and get a new IP address?
 
@@ -262,7 +266,7 @@ Make sure no entries in the routing tabl
 connected to the DSL modem.  You might want to add these lines in
 pppoe-connect:
 
-	ifconfig ethx down
-	ifconfig ethx up mtu 1500
+        ip link set ethx down
+	ip link set  ethx up mtu 1500
 
 which should reset things to sane values.
diff -pruN 3.12-1.2/doc/KERNEL-MODE-PPPOE 3.15-1/doc/KERNEL-MODE-PPPOE
--- 3.12-1.2/doc/KERNEL-MODE-PPPOE	2015-11-11 15:10:00.000000000 +0000
+++ 3.15-1/doc/KERNEL-MODE-PPPOE	2021-05-07 13:18:00.000000000 +0000
@@ -101,5 +101,5 @@ enable the larger PPP MTU.  The larger P
 to RFC 4638.
 
 --
-Dianne Skoll <dfs@roaringpenguin.com>
+Dianne Skoll <dianne@skoll.ca>
 
diff -pruN 3.12-1.2/go 3.15-1/go
--- 3.12-1.2/go	2015-11-11 15:09:57.000000000 +0000
+++ 3.15-1/go	2021-05-07 13:17:59.000000000 +0000
@@ -7,6 +7,7 @@
 # Quick-start shell script to set up PPPoE
 #
 # Copyright (C) 2000 Roaring Penguin Software Inc.
+# Copyright (C) 2018 Dianne Skoll
 #
 # $Id$
 #***********************************************************************
diff -pruN 3.12-1.2/go-gui 3.15-1/go-gui
--- 3.12-1.2/go-gui	2015-11-11 15:09:58.000000000 +0000
+++ 3.15-1/go-gui	2021-05-07 13:17:59.000000000 +0000
@@ -7,6 +7,7 @@
 # Quick-start shell script to set up PPPoE and GUI wrapper
 #
 # Copyright (C) 2000 Roaring Penguin Software Inc.
+# Copyright (C) 2018-2021 Dianne Skoll
 #
 # $Id$
 #***********************************************************************
diff -pruN 3.12-1.2/gui/html/tkpppoe.html 3.15-1/gui/html/tkpppoe.html
--- 3.12-1.2/gui/html/tkpppoe.html	2015-11-11 15:09:59.000000000 +0000
+++ 3.15-1/gui/html/tkpppoe.html	2021-05-07 13:17:59.000000000 +0000
@@ -175,7 +175,7 @@ connections.
 have to explicitly stop connections if you want them terminated.
 </ul>
 <hr>
-<a href="http://www.roaringpenguin.com/pppoe/">TkPPPoE</a> is Copyright 2001 by <a href="http://www.roaringpenguin.com">Roaring Penguin Software Inc</a> and
+<a href="https://dianne.skoll.ca/projects/rp-pppoe/">TkPPPoE</a> is Copyright 2001 Roaring Penguin Software Inc and
 is licensed under the GNU General Public License.
 <p>Screenshots show TkPPPoE running under the <a href="http://www.xfce.org">XFCE</a> desktop, a lightweight UNIX and Linux desktop.
 </body>
diff -pruN 3.12-1.2/gui/Makefile.in 3.15-1/gui/Makefile.in
--- 3.12-1.2/gui/Makefile.in	2015-11-11 15:09:58.000000000 +0000
+++ 3.15-1/gui/Makefile.in	2021-05-07 13:17:59.000000000 +0000
@@ -6,6 +6,7 @@
 # Makefile for GUI for Roaring Penguin's Linux user-space PPPoE client.
 #
 # Copyright (C) 2001 Roaring Penguin Software Inc.
+# Copyright (C) 2018-2021 Dianne Skoll
 #
 # This program may be distributed according to the terms of the GNU
 # General Public License, version 2 or (at your option) any later version.
@@ -23,6 +24,7 @@ install_dir=@INSTALL@ -d
 sbindir=@sbindir@
 bindir=@bindir@
 datadir=@datadir@
+datarootdir=@datarootdir@
 
 PPPOE_START_PATH=@sbindir@/pppoe-start
 PPPOE_STOP_PATH=@sbindir@/pppoe-stop
diff -pruN 3.12-1.2/gui/pppoe-wrapper.1 3.15-1/gui/pppoe-wrapper.1
--- 3.12-1.2/gui/pppoe-wrapper.1	2015-11-11 15:09:58.000000000 +0000
+++ 3.15-1/gui/pppoe-wrapper.1	2021-05-07 13:17:59.000000000 +0000
@@ -35,9 +35,9 @@ Otherwise, \fBpppoe-wrapper\fR runs \fBp
 \fBpppoe-status\fR with the above filename as its single argument.
 
 .SH AUTHOR
-\fBpppoe-wrapper\fR was written by Dianne Skoll <dfs@roaringpenguin.com>.
+\fBpppoe-wrapper\fR was written by Dianne Skoll <dianne@skoll.ca>.
 
-The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+The \fBpppoe\fR home page is \fIhttps://dianne.skoll.ca/projects/rp-pppoe/\fR.
 
 .SH SEE ALSO
 pppoe-start(8), pppoe-stop(8), pppoe-status(8), tkpppoe(1)
diff -pruN 3.12-1.2/gui/tkpppoe.1 3.15-1/gui/tkpppoe.1
--- 3.12-1.2/gui/tkpppoe.1	2015-11-11 15:09:58.000000000 +0000
+++ 3.15-1/gui/tkpppoe.1	2021-05-07 13:17:59.000000000 +0000
@@ -28,9 +28,9 @@ generated anew by \fBtkpppoe\fR each tim
 connection's properties.
 
 .SH AUTHOR
-\fBtkpppoe\fR was written by Dianne Skoll <dfs@roaringpenguin.com>.
+\fBtkpppoe\fR was written by Dianne Skoll <dianne@skoll.ca>.
 
-The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+The \fBpppoe\fR home page is \fIhttps://dianne.skoll.ca/projects/rp-pppoe/\fR.
 
 .SH SEE ALSO
 pppoe-start(8), pppoe-stop(8), pppoe-wrapper(8).
diff -pruN 3.12-1.2/gui/tkpppoe.in 3.15-1/gui/tkpppoe.in
--- 3.12-1.2/gui/tkpppoe.in	2015-11-11 15:09:58.000000000 +0000
+++ 3.15-1/gui/tkpppoe.in	2021-05-07 13:17:59.000000000 +0000
@@ -13,8 +13,6 @@
 #
 #   The "Roaring Penguin" logo is a trademark of Roaring Penguin Software Inc.
 #
-#   http://www.roaringpenguin.com
-#
 #--------------------------------------------------------------
 
 # $Id$
@@ -1573,9 +1571,9 @@ proc SetButtonStates {} {
 #***********************************************************************
 proc GetEthernetInterfaces {} {
     set ifs {}
-    set fp [open "|/sbin/ifconfig" "r"]
+    set fp [open "|@IP@ -o link show" "r"]
     while {[gets $fp line] >= 0} {
-	if {[regexp {^eth[0-9]+} $line eth]} {
+	if {[regexp {eth[0-9]+} $line eth]} {
 	    lappend ifs $eth
 	}
     }
@@ -2887,7 +2885,7 @@ proc doLogo {} {
 	after 25
     }
 
-    .c create text 4 28 -anchor nw -text "http://www.roaringpenguin.com" \
+    .c create text 4 28 -anchor nw -text "https://dianne.skoll.ca/projects/rp-pppoe/" \
 	    -fill red -font {-family courier -size -14 -weight bold}
     update idletasks
     after 2500
diff -pruN 3.12-1.2/gui/wrapper.c 3.15-1/gui/wrapper.c
--- 3.12-1.2/gui/wrapper.c	2015-11-11 15:09:58.000000000 +0000
+++ 3.15-1/gui/wrapper.c	2021-05-07 13:17:59.000000000 +0000
@@ -7,6 +7,7 @@
 * C wrapper designed to run SUID root for controlling PPPoE connections.
 *
 * Copyright (C) 2005 by Roaring Penguin Software Inc.
+* Copyright (C) 2018 Dianne Skoll
 *
 * LIC: GPL
 *
@@ -17,6 +18,7 @@
 #define _SVID_SOURCE 1 /* For putenv */
 #define _POSIX_SOURCE 1 /* For fileno */
 #define _BSD_SOURCE 1 /* For setreuid */
+#define _DEFAULT_SOURCE 1
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
diff -pruN 3.12-1.2/man/pppoe.8 3.15-1/man/pppoe.8
--- 3.12-1.2/man/pppoe.8	2015-11-11 15:10:01.000000000 +0000
+++ 3.15-1/man/pppoe.8	2021-05-07 13:18:00.000000000 +0000
@@ -219,7 +219,7 @@ It must be fairly efficient.
 .P
 I believe I have achieved all of these goals, but (of course) am open
 to suggestions, patches and ideas.  See my home page,
-http://www.roaringpenguin.com, for contact information.
+https://dianne.skoll.ca/projects/rp-pppoe/, for contact information.
 
 .SH NOTES
 
@@ -233,10 +233,10 @@ things to syslog.  You may have to turn
 messages for complete diagnosis.
 
 .SH AUTHORS
-\fBpppoe\fR was written by Dianne Skoll <dfs@roaringpenguin.com>,
+\fBpppoe\fR was written by Dianne Skoll <dianne@skoll.ca>,
 with much inspiration from an earlier version by Luke Stras.
 
-The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+The \fBpppoe\fR home page is \fIhttps://dianne.skoll.ca/projects/rp-pppoe/\fR.
 
 .SH SEE ALSO
 pppoe-start(8), pppoe-stop(8), pppoe-connect(8), pppd(8), pppoe.conf(5), pppoe-setup(8), pppoe-status(8), pppoe-sniff(8), pppoe-server(8), pppoe-relay(8)
diff -pruN 3.12-1.2/man/pppoe.conf.5 3.15-1/man/pppoe.conf.5
--- 3.12-1.2/man/pppoe.conf.5	2015-11-11 15:10:02.000000000 +0000
+++ 3.15-1/man/pppoe.conf.5	2021-05-07 13:18:00.000000000 +0000
@@ -7,7 +7,7 @@ pppoe.conf \- Configuration file used by
 
 .SH DESCRIPTION
 \fB/etc/ppp/pppoe.conf\fR is a shell script which contains configuration
-information for Roaring Penguin's PPPoE scripts.  Note that \fBpppoe.conf\fR
+information for RP-PPPoE scripts.  Note that \fBpppoe.conf\fR
 is used only by the various pppoe-* shell scripts, not by \fBpppoe\fR
 itself.
 
diff -pruN 3.12-1.2/man/pppoe-connect.8 3.15-1/man/pppoe-connect.8
--- 3.12-1.2/man/pppoe-connect.8	2015-11-11 15:10:01.000000000 +0000
+++ 3.15-1/man/pppoe-connect.8	2021-05-07 13:18:00.000000000 +0000
@@ -57,9 +57,9 @@ configuration file as an argument to \fB
 \fBpppoe-stop\fR.
 
 .SH AUTHOR
-\fBpppoe-connect\fR was written by Dianne Skoll <dfs@roaringpenguin.com>.
+\fBpppoe-connect\fR was written by Dianne Skoll <dianne@skoll.ca>.
 
-The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+The \fBpppoe\fR home page is \fIhttps://dianne.skoll.ca/projects/rp-pppoe/\fR.
 
 .SH SEE ALSO
 pppoe(8), pppoe-start(8), pppoe-stop(8), pppd(8), pppoe.conf(5), pppoe-setup(8), pppoe-status(8), pppoe-sniff(8), pppoe-server(8), pppoe-relay(8)
diff -pruN 3.12-1.2/man/pppoe-relay.8 3.15-1/man/pppoe-relay.8
--- 3.12-1.2/man/pppoe-relay.8	2015-11-11 15:10:02.000000000 +0000
+++ 3.15-1/man/pppoe-relay.8	2021-05-07 13:18:00.000000000 +0000
@@ -114,9 +114,9 @@ This example relays frames between serve
 clients on the eth1, eth2 and eth3 networks.
 
 .SH AUTHORS
-\fBpppoe-relay\fR was written by Dianne Skoll <dfs@roaringpenguin.com>.
+\fBpppoe-relay\fR was written by Dianne Skoll <dianne@skoll.ca>.
 
-The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+The \fBpppoe\fR home page is \fIhttps://dianne.skoll.ca/projects/rp-pppoe/\fR.
 
 .SH SEE ALSO
 pppoe-start(8), pppoe-stop(8), pppoe-connect(8), pppd(8), pppoe.conf(5),
diff -pruN 3.12-1.2/man/pppoe-server.8 3.15-1/man/pppoe-server.8
--- 3.12-1.2/man/pppoe-server.8	2015-11-11 15:10:01.000000000 +0000
+++ 3.15-1/man/pppoe-server.8	2021-05-07 13:18:00.000000000 +0000
@@ -101,6 +101,17 @@ Allows at most \fInum\fR concurrent PPPo
 the default is 64.
 
 .TP
+.B \-M \fIstring\fR
+Sends \fIstring\fR in a MOTM tag in a PADM packet right after sending
+the PADS to a client.
+
+.TP
+.B \-H \fIurl\fR
+Sends \fIurl\fR in a HURL tag in a PADM packet right after sending the
+PADS to a client.  Note that \fIurl\fR must start with either
+\fBhttp://\fR or \fBhttps://\fR.
+
+.TP
 .B \-O \fIfname\fR
 This option causes \fBpppoe-server\fR to tell \fBpppd\fR to use the option
 file \fIfname\fR instead of the default \fI/etc/ppp/pppoe-server-options\fR.
@@ -198,9 +209,9 @@ Note that \fBpppoe-server\fR is meant ma
 It is \fInot\fR a high-performance server meant for production use.
 
 .SH AUTHORS
-\fBpppoe-server\fR was written by Dianne Skoll <dfs@roaringpenguin.com>.
+\fBpppoe-server\fR was written by Dianne Skoll <dianne@skoll.ca>.
 
-The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+The \fBpppoe\fR home page is \fIhttps://dianne.skoll.ca/projects/rp-pppoe/\fR.
 
 .SH SEE ALSO
 pppoe-start(8), pppoe-stop(8), pppoe-connect(8), pppd(8), pppoe.conf(5),
diff -pruN 3.12-1.2/man/pppoe-setup.8 3.15-1/man/pppoe-setup.8
--- 3.12-1.2/man/pppoe-setup.8	2015-11-11 15:10:01.000000000 +0000
+++ 3.15-1/man/pppoe-setup.8	2021-05-07 13:18:00.000000000 +0000
@@ -2,7 +2,7 @@
 .TH PPPOE-SETUP 8 "21 February 2000"
 .UC 4
 .SH NAME
-pppoe-setup \- Shell script to configure Roaring Penguin PPPoE client
+pppoe-setup \- Shell script to configure RP-PPPoE client
 .SH SYNOPSIS
 .B pppoe-setup
 
@@ -12,9 +12,9 @@ of information and sets up an /etc/ppp/p
 for the \fBpppoe-start\fR, \fBpppoe-stop\fR and \fBpppoe-connect\fR scripts.
 
 .SH AUTHOR
-\fBpppoe-setup\fR was written by Dianne Skoll <dfs@roaringpenguin.com>.
+\fBpppoe-setup\fR was written by Dianne Skoll <dianne@skoll.ca>.
 
-The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+The \fBpppoe\fR home page is \fIhttps://dianne.skoll.ca/projects/rp-pppoe/\fR.
 
 .SH SEE ALSO
 pppoe(8), pppoe-start(8), pppoe-stop(8), pppoe-connect(8), pppd(8),
diff -pruN 3.12-1.2/man/pppoe-sniff.8 3.15-1/man/pppoe-sniff.8
--- 3.12-1.2/man/pppoe-sniff.8	2015-11-11 15:10:01.000000000 +0000
+++ 3.15-1/man/pppoe-sniff.8	2021-05-07 13:18:00.000000000 +0000
@@ -31,24 +31,19 @@ and start \fBpppoe-sniff\fR.  If the eth
 for example, type these commands:
 
 .nf
-	ifconfig eth0 promisc
+	ip link set eth0 promisc on
 	pppoe-sniff -I eth0
 .fi
 
 On the other machine, start your DSL connection as usual.  After a short
 time, \fBpppoe-sniff\fR should print recommendations for the value
 of \fBPPPOE_EXTRA\fR.  Set this value in \fB/etc/ppp/pppoe.conf\fR.
-If \fBpppoe-sniff\fR indicates that something special is required in
-\fBPPPOE_EXTRA\fR, please e-mail this to \fBpppoe@roaringpenguin.com\fR
-along with the name of your ISP and the manufacturer and model number of
-your DSL modem.  This information will be collated and provided on the
-PPPoE web page for users who do not have two computers.
 
 After \fBpppoe-sniff\fR finishes (or you stop it if it seems hung),
 remember to turn off promiscuous mode:
 
 .nf
-	ifconfig eth0 -promisc
+	ip link set eth0 promisc on
 .fi
 
 .SH OPTIONS
@@ -67,9 +62,9 @@ exit.
 \fBpppoe-sniff\fR only works on Linux.
 
 .SH AUTHORS
-\fBpppoe-sniff\fR was written by Dianne Skoll <dfs@roaringpenguin.com>.
+\fBpppoe-sniff\fR was written by Dianne Skoll <dianne@skoll.ca>.
 
-The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+The \fBpppoe\fR home page is \fIhttps://dianne.skoll.ca/projects/rp-pppoe/\fR.
 
 .SH SEE ALSO
 pppoe-start(8), pppoe-stop(8), pppoe-connect(8), pppd(8), pppoe.conf(5),
diff -pruN 3.12-1.2/man/pppoe-start.8 3.15-1/man/pppoe-start.8
--- 3.12-1.2/man/pppoe-start.8	2015-11-11 15:10:01.000000000 +0000
+++ 3.15-1/man/pppoe-start.8	2021-05-07 13:18:00.000000000 +0000
@@ -9,16 +9,16 @@ pppoe-start \- Shell script to bring up
 .B pppoe-start \fR\fIinterface user\fR [\fIconfig_file\fR]
 
 .SH DESCRIPTION
-\fBpppoe-start\fR is a shell script which starts the Roaring Penguin
+\fBpppoe-start\fR is a shell script which starts the RP-PPPoE
 user-space PPPoE client.  If you omit \fIconfig_file\fR, the default
 file \fB/etc/ppp/pppoe.conf\fR is used.  If you supply
 \fIinterface\fR and \fIuser\fR, then they override the Ethernet interface
 and user-name settings in the configuration file.
 
 .SH AUTHOR
-\fBpppoe-start\fR was written by Dianne Skoll <dfs@roaringpenguin.com>.
+\fBpppoe-start\fR was written by Dianne Skoll <dianne@skoll.ca>.
 
-The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+The \fBpppoe\fR home page is \fIhttps://dianne.skoll.ca/projects/rp-pppoe/\fR.
 
 .SH SEE ALSO
 pppoe(8), pppoe-stop(8), pppoe-connect(8), pppd(8), pppoe.conf(5),
diff -pruN 3.12-1.2/man/pppoe-status.8 3.15-1/man/pppoe-status.8
--- 3.12-1.2/man/pppoe-status.8	2015-11-11 15:10:01.000000000 +0000
+++ 3.15-1/man/pppoe-status.8	2021-05-07 13:18:00.000000000 +0000
@@ -13,9 +13,9 @@ If you omit \fIconfig_file\fR, the defau
 \fB/etc/ppp/pppoe.conf\fR is used.
 
 .SH AUTHOR
-\fBpppoe-status\fR was written by Dianne Skoll <dfs@roaringpenguin.com>.
+\fBpppoe-status\fR was written by Dianne Skoll <dianne@skoll.ca>.
 
-The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+The \fBpppoe\fR home page is \fIhttps://dianne.skoll.ca/projects/rp-pppoe/\fR.
 
 .SH SEE ALSO
 pppoe(8), pppoe-start(8), pppoe-connect(8), pppd(8), pppoe.conf(5),
diff -pruN 3.12-1.2/man/pppoe-stop.8 3.15-1/man/pppoe-stop.8
--- 3.12-1.2/man/pppoe-stop.8	2015-11-11 15:10:01.000000000 +0000
+++ 3.15-1/man/pppoe-stop.8	2021-05-07 13:18:00.000000000 +0000
@@ -7,14 +7,14 @@ pppoe-stop \- Shell script to shut down
 .B pppoe-stop \fR[\fIconfig_file\fR]
 
 .SH DESCRIPTION
-\fBpppoe-stop\fR is a shell script which stops the Roaring Penguin
+\fBpppoe-stop\fR is a shell script which stops the RP-PPPoE
 user-space PPPoE client.  If you omit \fIconfig_file\fR, the default
 file \fB/etc/ppp/pppoe.conf\fR is used.
 
 .SH AUTHOR
-\fBpppoe-stop\fR was written by Dianne Skoll <dfs@roaringpenguin.com>.
+\fBpppoe-stop\fR was written by Dianne Skoll <dianne@skoll.ca>
 
-The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+The \fBpppoe\fR home page is \fIhttps://dianne.skoll.ca/projects/rp-pppoe/\fR.
 
 .SH SEE ALSO
 pppoe(8), pppoe-start(8), pppoe-connect(8), pppd(8), pppoe.conf(5), pppoe-setup(8), pppoe-status(8), pppoe-sniff(8), pppoe-relay(8), pppoe-server(8)
diff -pruN 3.12-1.2/README 3.15-1/README
--- 3.12-1.2/README	2015-11-11 15:09:57.000000000 +0000
+++ 3.15-1/README	2021-05-07 13:17:59.000000000 +0000
@@ -2,6 +2,7 @@
 
 pppoe: a PPP-over-Ethernet redirector for pppd
 Copyright (C) 2001-2012 Roaring Penguin Software Inc.
+Copyright (C) 2018-2021 Dianne Skoll
 
 Some inspiration from an earlier client by Luke Stras.
 
@@ -84,5 +85,5 @@ Compile and install pppd if you don't al
 5) Now read doc/HOW-TO-CONNECT
 
 --
-Dianne Skoll <dfs@roaringpenguin.com> | Roaring Penguin Software Inc.
-http://www.roaringpenguin.com
+Dianne Skoll <dianne@skoll.ca>
+https://dianne.skoll.ca/projects/rp-pppoe/
diff -pruN 3.12-1.2/rp-pppoe.spec 3.15-1/rp-pppoe.spec
--- 3.12-1.2/rp-pppoe.spec	2015-11-11 15:09:58.000000000 +0000
+++ 3.15-1/rp-pppoe.spec	2021-05-07 13:17:59.000000000 +0000
@@ -1,6 +1,6 @@
 Summary: PPP Over Ethernet (xDSL support)
 Name: rp-pppoe
-Version: 3.12
+Version: 3.15
 %if %(%{expand:test %{_vendor} != mandrake ; echo $?})
 Release: 1mdk
 %else
@@ -8,17 +8,17 @@ Release: 1
 %endif
 License: GPL
 Group: System Environment/Daemons
-Source: http://www.roaringpenguin.com/pppoe/rp-pppoe-3.12.tar.gz
-Url: http://www.roaringpenguin.com/pppoe/
-Packager: Dianne Skoll <dfs@roaringpenguin.com>
+Source: https://dianne.skoll.ca/projects/rp-pppoe/download/rp-pppoe-3.15.tar.gz
+Url: https://dianne.skoll.ca/projects/rp-pppoe/
+Packager: Dianne Skoll <dianne@skoll.ca>
 BuildRoot: /tmp/pppoe-build
-Vendor: Roaring Penguin Software Inc.
+Vendor: Dianne Skoll
 Requires: ppp >= 2.3.7
 
 # LIC: GPL
 %description
 PPPoE (Point-to-Point Protocol over Ethernet) is a protocol used by
-many DSL Internet Service Providers. Roaring Penguin has a free
+many DSL Internet Service Providers. RP-PPPoE is a free
 client for Linux systems to connect to PPPoE service providers.
 
 The client is a user-mode program and does not require any kernel
diff -pruN 3.12-1.2/scripts/pppoe-connect.in 3.15-1/scripts/pppoe-connect.in
--- 3.12-1.2/scripts/pppoe-connect.in	2015-11-11 15:10:02.000000000 +0000
+++ 3.15-1/scripts/pppoe-connect.in	2021-05-07 13:18:00.000000000 +0000
@@ -28,6 +28,7 @@ exec_prefix=@exec_prefix@
 localstatedir=/var
 
 # Paths to programs
+IP=@IP@
 IFCONFIG=/sbin/ifconfig
 PPPD=@PPPD@
 SETSID=@SETSID@
@@ -115,11 +116,7 @@ fi
 # fails on some *BSD's, so we'll only do it under Linux
 
 if test `uname -s` = Linux ; then
-    $IFCONFIG $ETH up
-    EXISTING_MTU=`$IFCONFIG $ETH 2> /dev/null | grep MTU: | sed -e 's/.*MTU://' | sed -e 's/[^0-9].*//'`
-    if test "$EXISTING_MTU" = "" -o "$EXISTING_MTU" -lt 1500 ; then
-	$IFCONFIG $ETH mtu 1500
-    fi
+    $IP link set $ETH up mtu 1500
 
     # For 2.4 kernels.  Will fail on 2.2.x, but who cares?
     modprobe ppp_generic > /dev/null 2>&1
@@ -129,12 +126,14 @@ if test `uname -s` = Linux ; then
 	modprobe pppox > /dev/null 2>&1
 	modprobe pppoe > /dev/null 2>&1
     fi
+else
+    $IFCONFIG $ETH up
 fi
 
 if test "$SYNCHRONOUS" = "yes" ; then
     PPPOE_SYNC=-s
     PPPD_SYNC=sync
-	# Increase the chances of it working on Linux...
+    # Increase the chances of it working on Linux...
     if test `uname -s` = Linux ; then
 	modprobe n_hdlc > /dev/null 2>&1
     fi
diff -pruN 3.12-1.2/scripts/pppoe-init.in 3.15-1/scripts/pppoe-init.in
--- 3.12-1.2/scripts/pppoe-init.in	2015-11-11 15:10:02.000000000 +0000
+++ 3.15-1/scripts/pppoe-init.in	2021-05-07 13:18:00.000000000 +0000
@@ -7,9 +7,10 @@
 #
 # LIC: GPL
 #
-# Copyright (C) 2000 Roaring Penguin Software Inc.  This software may
-# be distributed under the terms of the GNU General Public License, version
-# 2 or any later version.
+# Copyright (C) 2000 Roaring Penguin Software Inc.
+# Copyright (C) 2018 Dianne Skoll
+# This software may be distributed under the terms of the GNU General
+# Public License, version 2 or any later version.
 
 # Source function library if it exists
 test -r /etc/rc.d/init.d/functions && . /etc/rc.d/init.d/functions
diff -pruN 3.12-1.2/scripts/pppoe-init-suse.in 3.15-1/scripts/pppoe-init-suse.in
--- 3.12-1.2/scripts/pppoe-init-suse.in	2015-11-11 15:10:02.000000000 +0000
+++ 3.15-1/scripts/pppoe-init-suse.in	2021-05-07 13:18:00.000000000 +0000
@@ -7,9 +7,12 @@
 #
 # LIC: GPL
 #
-# Copyright (C) 2000 Roaring Penguin Software Inc.  This software may
-# be distributed under the terms of the GNU General Public License, version
-# 2 or any later version.
+# Copyright (C) 2000 Roaring Penguin Software Inc.
+# Copyright (C) 2018 Dianne Skoll
+
+# This software may be distributed under the terms of the GNU General
+# Public License, version 2 or any later version.
+
 # Modifed to work with SuSE 6.4 linux by Gary Cameron.
 #
 # Source function library.
diff -pruN 3.12-1.2/scripts/pppoe-init-turbolinux.in 3.15-1/scripts/pppoe-init-turbolinux.in
--- 3.12-1.2/scripts/pppoe-init-turbolinux.in	2015-11-11 15:10:02.000000000 +0000
+++ 3.15-1/scripts/pppoe-init-turbolinux.in	1970-01-01 00:00:00.000000000 +0000
@@ -1,64 +0,0 @@
-#!/bin/sh
-#
-# pppoe                 This script starts or stops a PPPoE connection
-#
-# chkconfig: 2345 99 01
-# description: Connects to PPPoE provider
-#
-# LIC: GPL
-#
-# Copyright (C) 2000 Roaring Penguin Software Inc.  This software may
-# be distributed under the terms of the GNU General Public License, version
-# 2 or any later version.
-
-# Source function library if it exists
-test -r /etc/rc.d/init.d/functions && . /etc/rc.d/init.d/functions
-
-# From AUTOCONF
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-
-# Paths to programs
-START=@sbindir@/pppoe-start
-STOP=@sbindir@/pppoe-stop
-STATUS=@sbindir@/pppoe-status
-case "$1" in
-    start)
-        echo -n "Bringing up PPPoE link: "
-
-	$START
-	if [ $? = 0 ] ; then
-		echo success
-		touch /var/lock/subsys/pppoe
-	else
-		echo failure
-	fi
-        ;;
-
-    stop)
-        echo -n "Shutting down PPPoE link: "
-
-	$STOP > /dev/null 2>&1
-	if [ $? = 0 ] ; then
-		echo success
-		rm -f /var/lock/subsys/pppoe
-	else
-		echo failure
-	fi
-        ;;
-
-    restart)
-	$0 stop
-	$0 start
-	;;
-
-    status)
-	$STATUS
-	;;
-
-    *)
-        echo "Usage: pppoe {start|stop|restart|status}"
-        exit 1
-esac
-
-exit 0
diff -pruN 3.12-1.2/scripts/pppoe-setup.in 3.15-1/scripts/pppoe-setup.in
--- 3.12-1.2/scripts/pppoe-setup.in	2015-11-11 15:10:02.000000000 +0000
+++ 3.15-1/scripts/pppoe-setup.in	2021-05-07 13:18:00.000000000 +0000
@@ -8,8 +8,8 @@
 # LIC: GPL
 #
 # Copyright (C) 2000 Roaring Penguin Software Inc.
+# Copyright (C) 2018 Dianne Skoll
 #
-# $Id$
 #***********************************************************************
 
 # From AUTOCONF
@@ -18,9 +18,9 @@ exec_prefix=@exec_prefix@
 
 # Paths to programs
 IFCONFIG=/sbin/ifconfig
+IP=@IP@
 PPPD=@PPPD@
 PPPOE=@sbindir@/pppoe
-ECHO=@ECHO@
 LOGGER="/usr/bin/logger -t `basename $0`"
 
 # Set to "C" locale so we can parse messages from commands
@@ -35,34 +35,34 @@ umask 077
 copy() {
     cp $1 $2
     if [ "$?" != 0 ] ; then
-	$ECHO "*** Error copying $1 to $2"
-	$ECHO "*** Quitting."
+	echo "*** Error copying $1 to $2"
+	echo "*** Quitting."
 	exit 1
     fi
 }
 
-$ECHO "Welcome to the Roaring Penguin PPPoE client setup.  First, I will run"
-$ECHO "some checks on your system to make sure the PPPoE client is installed"
-$ECHO "properly..."
-$ECHO ""
+echo "Welcome to the RP-PPPoE client setup.  First, I will run"
+echo "some checks on your system to make sure the PPPoE client is installed"
+echo "properly..."
+echo ""
 
 # Must be root
 if [ "`@ID@ -u`" != 0 ] ; then
-    $ECHO "$0: Sorry, you must be root to run this script"
+    echo "$0: Sorry, you must be root to run this script"
     exit 1
 fi
 
 # Prototype config file must exist
 if [ ! -r "$CONFIG" ] ; then
-    $ECHO "Oh, dear, I don't see the file '$CONFIG' anywhere.  Please"
-    $ECHO "re-install the PPPoE client."
+    echo "Oh, dear, I don't see the file '$CONFIG' anywhere.  Please"
+    echo "re-install the PPPoE client."
     exit 1
 fi
 
 # Must have pppd
 if [ ! -x $PPPD ] ; then
-    $ECHO "Oops, I can't execute the program '$PPPD'.  You"
-    $ECHO "must install the PPP software suite, version 2.3.10 or later."
+    echo "Oops, I can't execute the program '$PPPD'.  You"
+    echo "must install the PPP software suite, version 2.3.10 or later."
     exit 1
 fi
 export CONFIG
@@ -74,17 +74,17 @@ fi
 
 # pppoe must exist
 if [ ! -x "$PPPOE" ] ; then
-    $ECHO "Oh, dear, I can't execute the program '$PPPOE'.  Please"
-    $ECHO "re-install the rp-pppoe client."
+    echo "Oh, dear, I can't execute the program '$PPPOE'.  Please"
+    echo "re-install the rp-pppoe client."
     exit 1
 fi
 
-$ECHO "Looks good!  Now, please enter some information:"
+echo "Looks good!  Now, please enter some information:"
 
 while [ true ] ; do
-    $ECHO ""
-    $ECHO "USER NAME"
-    $ECHO ""
+    echo ""
+    echo "USER NAME"
+    echo ""
     printf "%s" ">>> Enter your PPPoE user name (default $USER): "
     read U
 
@@ -94,14 +94,16 @@ while [ true ] ; do
 
     # Under Linux, "fix" the default interface if eth1 is not available
     if test `uname -s` = "Linux" ; then
+        $IP link show $ETH > /dev/null 2>&1 || ETH=eth0
+    else
 	$IFCONFIG $ETH > /dev/null 2>&1 || ETH=eth0
     fi
-    $ECHO ""
-    $ECHO "INTERFACE"
-    $ECHO ""
-    $ECHO ">>> Enter the Ethernet interface connected to the DSL modem"
-    $ECHO "For Solaris, this is likely to be something like /dev/hme0."
-    $ECHO "For Linux, it will be ethn, where 'n' is a number."
+    echo ""
+    echo "INTERFACE"
+    echo ""
+    echo ">>> Enter the Ethernet interface connected to the DSL modem"
+    echo "For Solaris, this is likely to be something like /dev/hme0."
+    echo "For Linux, it will be ethn, where 'n' is a number."
     printf "%s" "(default $ETH): "
     read E
 
@@ -109,27 +111,27 @@ while [ true ] ; do
 	E="$ETH"
     fi
 
-    $ECHO ""
-    $ECHO "Do you want the link to come up on demand, or stay up continuously?"
-    $ECHO "If you want it to come up on demand, enter the idle time in seconds"
-    $ECHO "after which the link should be dropped.  If you want the link to"
-    $ECHO "stay up permanently, enter 'no' (two letters, lower-case.)"
-    $ECHO "NOTE: Demand-activated links do not interact well with dynamic IP"
-    $ECHO "addresses.  You may have some problems with demand-activated links."
+    echo ""
+    echo "Do you want the link to come up on demand, or stay up continuously?"
+    echo "If you want it to come up on demand, enter the idle time in seconds"
+    echo "after which the link should be dropped.  If you want the link to"
+    echo "stay up permanently, enter 'no' (two letters, lower-case.)"
+    echo "NOTE: Demand-activated links do not interact well with dynamic IP"
+    echo "addresses.  You may have some problems with demand-activated links."
     printf "%s" ">>> Enter the demand value (default $DEMAND): "
     read D
     if [ "$D" = "" ] ; then
 	D=$DEMAND
     fi
 
-    $ECHO ""
-    $ECHO "DNS"
-    $ECHO ""
-    $ECHO "Please enter the IP address of your ISP's primary DNS server."
-    $ECHO "If your ISP claims that 'the server will provide DNS addresses',"
-    $ECHO "enter 'server' (all lower-case) here."
-    $ECHO "If you just press enter, I will assume you know what you are"
-    $ECHO "doing and not modify your DNS setup."
+    echo ""
+    echo "DNS"
+    echo ""
+    echo "Please enter the IP address of your ISP's primary DNS server."
+    echo "If your ISP claims that 'the server will provide DNS addresses',"
+    echo "enter 'server' (all lower-case) here."
+    echo "If you just press enter, I will assume you know what you are"
+    echo "doing and not modify your DNS setup."
     printf "%s" ">>> Enter the DNS information here: "
 
     read DNS1
@@ -137,24 +139,24 @@ while [ true ] ; do
 
     if [ "$DNS1" != "" ] ; then
         if [ "$DNS1" != "server" ] ; then
-	    $ECHO "Please enter the IP address of your ISP's secondary DNS server."
-	    $ECHO "If you just press enter, I will assume there is only one DNS server."
+	    echo "Please enter the IP address of your ISP's secondary DNS server."
+	    echo "If you just press enter, I will assume there is only one DNS server."
 	    printf "%s" ">>> Enter the secondary DNS server address here: "
 	    read DNS2
 	fi
     fi
 
     while [ true ] ; do
-	$ECHO ""
-	$ECHO "PASSWORD"
-	$ECHO ""
+	echo ""
+	echo "PASSWORD"
+	echo ""
 	stty -echo
 	printf "%s" ">>> Please enter your PPPoE password:    "
 	read PWD1
-	$ECHO ""
+	echo ""
 	printf "%s" ">>> Please re-enter your PPPoE password: "
 	read PWD2
-	$ECHO ""
+	echo ""
 	stty echo
 	if [ "$PWD1" = "$PWD2" ] ; then
 	    break
@@ -164,44 +166,44 @@ while [ true ] ; do
 	read ANS
 	case "$ANS" in
 	    N|No|NO|Non|n|no|non)
-		$ECHO "OK, quitting.  Bye."
+		echo "OK, quitting.  Bye."
 		exit 1
 	esac
     done
 
     # Firewalling
-    $ECHO ""
-    $ECHO "FIREWALLING"
-    $ECHO ""
+    echo ""
+    echo "FIREWALLING"
+    echo ""
     if test `uname -s` != "Linux" ; then
-	$ECHO "Sorry, firewalling is only supported under Linux.  Consult"
-	$ECHO "your operating system manuals for details on setting up"
-	$ECHO "packet filters for your system."
+	echo "Sorry, firewalling is only supported under Linux.  Consult"
+	echo "your operating system manuals for details on setting up"
+	echo "packet filters for your system."
 	FIREWALL=NONE
     else
-	$ECHO "Please choose the firewall rules to use.  Note that these rules are"
-	$ECHO "very basic.  You are strongly encouraged to use a more sophisticated"
-	$ECHO "firewall setup; however, these will provide basic security.  If you"
-	$ECHO "are running any servers on your machine, you must choose 'NONE' and"
-	$ECHO "set up firewalling yourself.  Otherwise, the firewall rules will deny"
-	$ECHO "access to all standard servers like Web, e-mail, ftp, etc.  If you"
-	$ECHO "are using SSH, the rules will block outgoing SSH connections which"
-	$ECHO "allocate a privileged source port."
-	$ECHO ""
+	echo "Please choose the firewall rules to use.  Note that these rules are"
+	echo "very basic.  You are strongly encouraged to use a more sophisticated"
+	echo "firewall setup; however, these will provide basic security.  If you"
+	echo "are running any servers on your machine, you must choose 'NONE' and"
+	echo "set up firewalling yourself.  Otherwise, the firewall rules will deny"
+	echo "access to all standard servers like Web, e-mail, ftp, etc.  If you"
+	echo "are using SSH, the rules will block outgoing SSH connections which"
+	echo "allocate a privileged source port."
+	echo ""
 	while [ true ] ; do
-	    $ECHO "The firewall choices are:"
-	    $ECHO "0 - NONE: This script will not set any firewall rules.  You are responsible"
-	    $ECHO "          for ensuring the security of your machine.  You are STRONGLY"
-	    $ECHO "          recommended to use some kind of firewall rules."
-	    $ECHO "1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation"
-	    $ECHO "2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway"
-	    $ECHO "                for a LAN"
+	    echo "The firewall choices are:"
+	    echo "0 - NONE: This script will not set any firewall rules.  You are responsible"
+	    echo "          for ensuring the security of your machine.  You are STRONGLY"
+	    echo "          recommended to use some kind of firewall rules."
+	    echo "1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation"
+	    echo "2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway"
+	    echo "                for a LAN"
 	    printf "%s" ">>> Choose a type of firewall (0-2): "
 	    read a
 	    if [ "$a" = 0 -o "$a" = 1 -o "$a" = 2 ] ; then
 		break
 	    fi
-	    $ECHO "Please enter a number from 0 to 2"
+	    echo "Please enter a number from 0 to 2"
 	done
 
 	case "$a" in
@@ -217,31 +219,31 @@ while [ true ] ; do
 	esac
     fi
 
-    $ECHO ""
-    $ECHO "** Summary of what you entered **"
-    $ECHO ""
-    $ECHO "Ethernet Interface: $E"
-    $ECHO "User name:          $U"
+    echo ""
+    echo "** Summary of what you entered **"
+    echo ""
+    echo "Ethernet Interface: $E"
+    echo "User name:          $U"
     if [ "$D" = "no" ] ; then
-	$ECHO "Activate-on-demand: No"
+	echo "Activate-on-demand: No"
     else
-	$ECHO "Activate-on-demand: Yes; idle timeout = $D seconds"
+	echo "Activate-on-demand: Yes; idle timeout = $D seconds"
     fi
 
     if [ "$DNS1" != "" ] ; then
         if [ "$DNS1" = "server" ] ; then
-	    $ECHO "DNS addresses:      Supplied by ISP's server"
+	    echo "DNS addresses:      Supplied by ISP's server"
         else
-	    $ECHO "Primary DNS:        $DNS1"
+	    echo "Primary DNS:        $DNS1"
 	    if [ "$DNS2" != "" ] ; then
-		$ECHO "Secondary DNS:      $DNS2"
+		echo "Secondary DNS:      $DNS2"
 	    fi
         fi
     else
-	$ECHO "DNS:                Do not adjust"
+	echo "DNS:                Do not adjust"
     fi
-    $ECHO "Firewalling:        $FIREWALL"
-    $ECHO ""
+    echo "Firewalling:        $FIREWALL"
+    echo ""
     while [ true ] ; do
         printf "%s" '>>> Accept these settings and adjust configuration files (y/n)? '
         read ANS
@@ -264,7 +266,7 @@ done
 
 # Adjust configuration files.  First to $CONFIG
 
-$ECHO "Adjusting $CONFIG"
+echo "Adjusting $CONFIG"
 
 copy $CONFIG $CONFIG-bak
 if [ "$DNS1" = "server" ] ; then
@@ -300,53 +302,53 @@ sed -e "s&^USER=.*&USER='$U'&" \
     < $CONFIG-bak > $CONFIG
 
 if [ $? != 0 ] ; then
-    $ECHO "** Error modifying $CONFIG"
-    $ECHO "** Quitting"
+    echo "** Error modifying $CONFIG"
+    echo "** Quitting"
     exit 1
 fi
 
 if [ "$DNS1" != "" ] ; then
     if [ "$DNS1" != "server" ] ; then
-	$ECHO "Adjusting /etc/resolv.conf"
+	echo "Adjusting /etc/resolv.conf"
 	if [ -r /etc/resolv.conf ] ; then
 	    grep -s "MADE-BY-RP-PPPOE" /etc/resolv.conf > /dev/null 2>&1
 	    if [ "$?" != 0 ] ; then
-		$ECHO "  (But first backing it up to /etc/resolv.conf-bak)"
+		echo "  (But first backing it up to /etc/resolv.conf-bak)"
 		copy /etc/resolv.conf /etc/resolv.conf-bak
 	    fi
 	fi
-	$ECHO "# MADE-BY-RP-PPPOE" > /etc/resolv.conf
-	$ECHO "nameserver $DNS1" >> /etc/resolv.conf
+	echo "# MADE-BY-RP-PPPOE" > /etc/resolv.conf
+	echo "nameserver $DNS1" >> /etc/resolv.conf
 	if [ "$DNS2" != "" ] ; then
-	    $ECHO "nameserver $DNS2" >> /etc/resolv.conf
+	    echo "nameserver $DNS2" >> /etc/resolv.conf
 	fi
     fi
 fi
 
-$ECHO "Adjusting /etc/ppp/pap-secrets and /etc/ppp/chap-secrets"
+echo "Adjusting /etc/ppp/pap-secrets and /etc/ppp/chap-secrets"
 if [ -r /etc/ppp/pap-secrets ] ; then
-    $ECHO "  (But first backing it up to /etc/ppp/pap-secrets-bak)"
+    echo "  (But first backing it up to /etc/ppp/pap-secrets-bak)"
     copy /etc/ppp/pap-secrets /etc/ppp/pap-secrets-bak
 else
     cp /dev/null /etc/ppp/pap-secrets-bak
 fi
 if [ -r /etc/ppp/chap-secrets ] ; then
-    $ECHO "  (But first backing it up to /etc/ppp/chap-secrets-bak)"
+    echo "  (But first backing it up to /etc/ppp/chap-secrets-bak)"
     copy /etc/ppp/chap-secrets /etc/ppp/chap-secrets-bak
 else
     cp /dev/null /etc/ppp/chap-secrets-bak
 fi
 
 egrep -v "^$U|^\"$U\"" /etc/ppp/pap-secrets-bak > /etc/ppp/pap-secrets
-$ECHO "\"$U\"	*	\"$PWD1\"" >> /etc/ppp/pap-secrets
+echo "\"$U\"	*	\"$PWD1\"" >> /etc/ppp/pap-secrets
 egrep -v "^$U|^\"$U\"" /etc/ppp/chap-secrets-bak > /etc/ppp/chap-secrets
-$ECHO "\"$U\"	*	\"$PWD1\"" >> /etc/ppp/chap-secrets
+echo "\"$U\"	*	\"$PWD1\"" >> /etc/ppp/chap-secrets
 
-$ECHO ""
-$ECHO ""
-$ECHO ""
-$ECHO "Congratulations, it should be all set up!"
-$ECHO ""
-$ECHO "Type 'pppoe-start' to bring up your PPPoE link and 'pppoe-stop' to bring"
-$ECHO "it down.  Type 'pppoe-status' to see the link status."
+echo ""
+echo ""
+echo ""
+echo "Congratulations, it should be all set up!"
+echo ""
+echo "Type 'pppoe-start' to bring up your PPPoE link and 'pppoe-stop' to bring"
+echo "it down.  Type 'pppoe-status' to see the link status."
 exit 0
diff -pruN 3.12-1.2/scripts/pppoe-start.in 3.15-1/scripts/pppoe-start.in
--- 3.12-1.2/scripts/pppoe-start.in	2015-11-11 15:10:02.000000000 +0000
+++ 3.15-1/scripts/pppoe-start.in	2021-05-07 13:18:00.000000000 +0000
@@ -7,6 +7,7 @@
 # Shell script to bring up a PPPoE connection
 #
 # Copyright (C) 2000 Roaring Penguin Software Inc.
+# Copyright (C) 2018 Dianne Skoll
 #
 # $Id$
 #
@@ -28,8 +29,7 @@ exec_prefix=@exec_prefix@
 
 # Paths to programs
 CONNECT=@sbindir@/pppoe-connect
-ECHO=@ECHO@
-IFCONFIG=/sbin/ifconfig
+IP=@IP@
 
 # Set to "C" locale so we can parse messages from commands
 LANG=C
@@ -42,63 +42,62 @@ ETH=""
 ME=`basename $0`
 # Must be root
 if [ "`@ID@ -u`" != 0 ] ; then
-    $ECHO "$ME: You must be root to run this script" >& 2
+    echo "$ME: You must be root to run this script" >& 2
     exit 1
 fi
 
 # Debugging
 if [ "$DEBUG" = "1" ] ; then
-    $ECHO "*** Running in debug mode... please be patient..."
-    DEBUG=/tmp/pppoe-debug-$$
-    export DEBUG
-    mkdir $DEBUG
+    echo "*** Running in debug mode... please be patient..."
+    DEBUG="/tmp/pppoe-debug-$$"
+    mkdir "$DEBUG"
     if [ "$?" != 0 ] ; then
-	$ECHO "Could not create directory $DEBUG... exiting"
+	echo "Could not create directory $DEBUG... exiting"
 	exit 1
     fi
-    DEBUG=$DEBUG/pppoe-debug.txt
+    DEBUG="$DEBUG/pppoe-debug.txt"
 
     # Initial debug output
-    $ECHO "---------------------------------------------" > $DEBUG
-    $ECHO "* The following section contains information about your system" >> $DEBUG
-    date >> $DEBUG
-    $ECHO "Output of uname -a" >> $DEBUG
-    uname -a >> $DEBUG
-    $ECHO "---------------------------------------------" >> $DEBUG
-    $ECHO "* The following section contains information about your network" >> $DEBUG
-    $ECHO "* interfaces.  The one you chose for PPPoE should contain the words:" >> $DEBUG
-    $ECHO "* 'UP' and 'RUNNING'.  If it does not, you probably have an Ethernet" >> $DEBUG
-    $ECHO "* driver problem." >> $DEBUG
-    $ECHO "Output of ifconfig -a" >> $DEBUG
-    $IFCONFIG -a >> $DEBUG
-    $ECHO "---------------------------------------------" >> $DEBUG
-    if [ "`uname -s`" = "Linux" ] ; then
-        $ECHO "* The following section contains information about kernel modules" >> $DEBUG
-	$ECHO "* If the module for your Ethernet card is 'tulip', you might" >> $DEBUG
-	$ECHO "* want to look for an updated version at http://www.scyld.com" >> $DEBUG
-	$ECHO "Output of lsmod" >> $DEBUG
-	lsmod >> $DEBUG
-	$ECHO "---------------------------------------------" >> $DEBUG
-    fi
-    $ECHO "* The following section lists your routing table." >> $DEBUG
-    $ECHO "* If you have an entry which starts with '0.0.0.0', you probably" >> $DEBUG
-    $ECHO "* have defined a default route and gateway, and pppd will" >> $DEBUG
-    $ECHO "* not create a default route using your ISP.  Try getting" >> $DEBUG
-    $ECHO "* rid of this route." >> $DEBUG
-    $ECHO "Output of netstat -n -r" >> $DEBUG
-    netstat -n -r >> $DEBUG
-    $ECHO "---------------------------------------------" >> $DEBUG
-    $ECHO "Contents of /etc/resolv.conf" >> $DEBUG
-    $ECHO "* The following section lists DNS setup." >> $DEBUG
-    $ECHO "* If you can browse by IP address, but not name, suspect" >> $DEBUG
-    $ECHO "* a DNS problem." >> $DEBUG
-    cat /etc/resolv.conf >> $DEBUG
-    $ECHO "---------------------------------------------" >> $DEBUG
-    $ECHO "* The following section lists /etc/ppp/options." >> $DEBUG
-    $ECHO "* You should have NOTHING in that file." >> $DEBUG
-    $ECHO "Contents of /etc/ppp/options" >> $DEBUG
-    cat /etc/ppp/options >> $DEBUG 2>/dev/null
-    $ECHO "---------------------------------------------" >> $DEBUG
+    {
+	echo "---------------------------------------------"
+	echo "* The following section contains information about your system"
+	date
+	echo "Output of uname -a"
+	uname -a
+	echo "---------------------------------------------"
+	echo "* The following section contains information about your network"
+	echo "* interfaces.  The one you chose for PPPoE should contain the words:"
+	echo "* 'UP' and 'RUNNING'.  If it does not, you probably have an Ethernet"
+	echo "* driver problem."
+	echo "Output of ip link show"
+        $IP link show
+	echo "---------------------------------------------"
+	if [ "`uname -s`" = "Linux" ] ; then
+	    echo "* The following section contains information about kernel modules."
+	    echo "Output of lsmod"
+	    lsmod
+	    echo "---------------------------------------------"
+	fi
+	echo "* The following section lists your routing table."
+	echo "* If you have an entry which starts with '0.0.0.0', you probably"
+	echo "* have defined a default route and gateway, and pppd will"
+	echo "* not create a default route using your ISP.  Try getting"
+	echo "* rid of this route."
+	echo "Output of ip route"
+        $IP route
+	echo "---------------------------------------------"
+	echo "Contents of /etc/resolv.conf"
+	echo "* The following section lists DNS setup."
+	echo "* If you can browse by IP address, but not name, suspect"
+	echo "* a DNS problem."
+	cat /etc/resolv.conf
+	echo "---------------------------------------------"
+	echo "* The following section lists /etc/ppp/options."
+	echo "* You should have NOTHING in that file."
+	echo "Contents of /etc/ppp/options"
+	cat /etc/ppp/options 2>/dev/null
+	echo "---------------------------------------------"
+    } > "$DEBUG"
 else
     DEBUG=""
 fi
@@ -114,11 +113,11 @@ case "$#" in
 esac
 
 if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
-    $ECHO "$ME: Cannot read configuration file '$CONFIG'" >& 2
+    echo "$ME: Cannot read configuration file '$CONFIG'" >& 2
     exit 1
 fi
 export CONFIG
-. $CONFIG
+. "$CONFIG"
 
 # Check for command-line overriding of ETH and USER
 case "$#" in
@@ -134,7 +133,7 @@ if [ -r "$PIDFILE" ] ; then
     # Check if still running
     kill -0 $PID > /dev/null 2>&1
     if [ $? = 0 ] ; then
-	$ECHO "$ME: There already seems to be a PPPoE connection up (PID $PID)" >& 2
+	echo "$ME: There already seems to be a PPPoE connection up (PID $PID)" >& 2
 	exit 1
     fi
     # Delete bogus PIDFILE
@@ -164,12 +163,12 @@ fi
 # Monitor connection
 TIME=0
 while [ true ] ; do
-    @sbindir@/pppoe-status $CONFIG > /dev/null 2>&1
+    @sbindir@/pppoe-status "$CONFIG" > /dev/null 2>&1
 
     # Looks like the interface came up
     if [ $? = 0 ] ; then
 	# Print newline if standard input is a TTY
-	tty -s && $ECHO " Connected!"
+	tty -s && echo " Connected!"
 	exit 0
     fi
 
@@ -185,7 +184,7 @@ while [ true ] ; do
     fi
 done
 
-$ECHO "TIMED OUT" >& 2
+echo "TIMED OUT" >& 2
 # Timed out!  Kill the pppoe-connect process and quit
 kill $CONNECT_PID > /dev/null 2>&1
 
diff -pruN 3.12-1.2/scripts/pppoe-status 3.15-1/scripts/pppoe-status
--- 3.12-1.2/scripts/pppoe-status	2015-11-11 15:10:02.000000000 +0000
+++ 3.15-1/scripts/pppoe-status	2021-05-07 13:18:00.000000000 +0000
@@ -6,6 +6,7 @@
 # Shell script to report on status of PPPoE connection
 #
 # Copyright (C) 2000-2001 Roaring Penguin Software Inc.
+# Copyright (C) 2018 Dianne Skoll
 #
 # $Id$
 #
@@ -21,6 +22,7 @@
 
 # Defaults
 CONFIG=/etc/ppp/pppoe.conf
+PATH=/bin:/usr/bin:/sbin:/usr/sbin:$PATH IP=`which ip`
 
 case "$#" in
     1)
@@ -66,14 +68,13 @@ for i in /etc/ppp/ppp*.pid /var/run/ppp*
 	PID=`cat $i`
 	if [ "$PID" = "$PPPD_PID" ] ; then
 	    IF=`basename $i .pid`
-	    netstat -rn | grep " ${IF}\$" > /dev/null
-	    # /sbin/ifconfig $IF | grep "UP.*POINTOPOINT" > /dev/null
+	    $IP route | grep "dev ${IF}" > /dev/null
 	    if [ "$?" != "0" ] ; then
 		echo "pppoe-status: Link is attached to $IF, but $IF is down"
 		exit 1
 	    fi
 	    echo "pppoe-status: Link is up and running on interface $IF"
-	    /sbin/ifconfig $IF
+	    $IP link show $IF
 	    exit 0
 	fi
     fi
@@ -81,4 +82,4 @@ done
 
 echo "pppoe-status: Link is down -- could not find interface corresponding to"
 echo "pppd pid $PPPD_PID"
-exit 1
\ No newline at end of file
+exit 1
diff -pruN 3.12-1.2/scripts/pppoe-stop.in 3.15-1/scripts/pppoe-stop.in
--- 3.12-1.2/scripts/pppoe-stop.in	2015-11-11 15:10:02.000000000 +0000
+++ 3.15-1/scripts/pppoe-stop.in	2021-05-07 13:18:00.000000000 +0000
@@ -7,6 +7,7 @@
 # Shell script to bring down a PPPoE connection
 #
 # Copyright (C) 2000 Roaring Penguin Software Inc.
+# Copyright (C) 2018 Dianne Skoll
 #
 # $Id$
 #
diff -pruN 3.12-1.2/SERVPOET 3.15-1/SERVPOET
--- 3.12-1.2/SERVPOET	2015-11-11 15:09:57.000000000 +0000
+++ 3.15-1/SERVPOET	2021-05-07 13:17:59.000000000 +0000
@@ -15,4 +15,4 @@ administration.  For information on Serv
 Contact Fine Point Technologies, Inc.  (http://www.finepoint.com/)
 
 --
-Dianne Skoll <dfs@roaringpenguin.com>
+Dianne Skoll <dianne@skoll.ca>
diff -pruN 3.12-1.2/src/common.c 3.15-1/src/common.c
--- 3.12-1.2/src/common.c	2015-11-11 15:10:03.000000000 +0000
+++ 3.15-1/src/common.c	2021-05-07 13:18:00.000000000 +0000
@@ -7,6 +7,7 @@
 * Common functions used by PPPoE client and server
 *
 * Copyright (C) 2000-2012 by Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This program may be distributed according to the terms of the GNU
 * General Public License, version 2 or (at your option) any later version.
@@ -15,13 +16,9 @@
 *
 ***********************************************************************/
 
-static char const RCSID[] =
-"$Id$";
 /* For vsnprintf prototype */
 #define _ISOC99_SOURCE 1
-
-/* For seteuid prototype */
-#define _BSD_SOURCE 1
+#define _GNU_SOURCE 1
 
 #include "pppoe.h"
 
@@ -67,12 +64,12 @@ parsePacket(PPPoEPacket *packet, ParseFu
     unsigned char *curTag;
     UINT16_t tagType, tagLen;
 
-    if (packet->ver != 1) {
-	syslog(LOG_ERR, "Invalid PPPoE version (%d)", (int) packet->ver);
+    if (PPPOE_VER(packet->vertype) != 1) {
+	syslog(LOG_ERR, "Invalid PPPoE version (%d)", PPPOE_VER(packet->vertype));
 	return -1;
     }
-    if (packet->type != 1) {
-	syslog(LOG_ERR, "Invalid PPPoE type (%d)", (int) packet->type);
+    if (PPPOE_TYPE(packet->vertype) != 1) {
+	syslog(LOG_ERR, "Invalid PPPoE type (%d)", PPPOE_TYPE(packet->vertype));
 	return -1;
     }
 
@@ -84,12 +81,10 @@ parsePacket(PPPoEPacket *packet, ParseFu
 
     /* Step through the tags */
     curTag = packet->payload;
-    while(curTag - packet->payload < len) {
+    while (curTag - packet->payload + TAG_HDR_SIZE <= len) {
 	/* Alignment is not guaranteed, so do this by hand... */
-	tagType = (((UINT16_t) curTag[0]) << 8) +
-	    (UINT16_t) curTag[1];
-	tagLen = (((UINT16_t) curTag[2]) << 8) +
-	    (UINT16_t) curTag[3];
+	tagType = (curTag[0] << 8) + curTag[1];
+	tagLen = (curTag[2] << 8) + curTag[3];
 	if (tagType == TAG_END_OF_LIST) {
 	    return 0;
 	}
@@ -122,12 +117,12 @@ findTag(PPPoEPacket *packet, UINT16_t ty
     unsigned char *curTag;
     UINT16_t tagType, tagLen;
 
-    if (packet->ver != 1) {
-	syslog(LOG_ERR, "Invalid PPPoE version (%d)", (int) packet->ver);
+    if (PPPOE_VER(packet->vertype) != 1) {
+	syslog(LOG_ERR, "Invalid PPPoE version (%d)", PPPOE_VER(packet->vertype));
 	return NULL;
     }
-    if (packet->type != 1) {
-	syslog(LOG_ERR, "Invalid PPPoE type (%d)", (int) packet->type);
+    if (PPPOE_TYPE(packet->vertype) != 1) {
+	syslog(LOG_ERR, "Invalid PPPoE type (%d)", PPPOE_TYPE(packet->vertype));
 	return NULL;
     }
 
@@ -253,25 +248,6 @@ printErr(char const *str)
     syslog(LOG_ERR, "%s", str);
 }
 
-
-/**********************************************************************
-*%FUNCTION: strDup
-*%ARGUMENTS:
-* str -- string to copy
-*%RETURNS:
-* A malloc'd copy of str.  Exits if malloc fails.
-***********************************************************************/
-char *
-strDup(char const *str)
-{
-    char *copy = malloc(strlen(str)+1);
-    if (!copy) {
-	rp_fatal("strdup failed");
-    }
-    strcpy(copy, str);
-    return copy;
-}
-
 /**********************************************************************
 *%FUNCTION: computeTCPChecksum
 *%ARGUMENTS:
@@ -505,8 +481,7 @@ sendPADT(PPPoEConnection *conn, char con
     memcpy(packet.ethHdr.h_source, conn->myEth, ETH_ALEN);
 
     packet.ethHdr.h_proto = htons(Eth_PPPOE_Discovery);
-    packet.ver = 1;
-    packet.type = 1;
+    packet.vertype = PPPOE_VER_TYPE(1, 1);
     packet.code = CODE_PADT;
     packet.session = conn->session;
 
@@ -647,3 +622,39 @@ parseLogErrs(UINT16_t type, UINT16_t len
 {
     pktLogErrs("PADT", type, len, data, extra);
 }
+
+#ifndef HAVE_STRLCPY
+/**********************************************************************
+*%FUNCTION: strlcpy
+*%ARGUMENTS:
+* dst -- destination buffer
+* src -- source string
+* size -- size of destination buffer
+*%RETURNS:
+* Number of characters copied, excluding NUL terminator
+*%DESCRIPTION:
+* Copy at most size-1 characters from src to dst,
+* always NUL-terminating dst if size!=0.
+***********************************************************************/
+size_t
+strlcpy(char *dst, const char *src, size_t size)
+{
+    const char *orig_src = src;
+
+    if (size == 0) {
+	return 0;
+    }
+
+    while (--size != 0) {
+	if ((*dst++ = *src++) == '\0') {
+	    break;
+	}
+    }
+
+    if (size == 0) {
+	*dst = '\0';
+    }
+
+    return src - orig_src - 1;
+}
+#endif
diff -pruN 3.12-1.2/src/config.h.in 3.15-1/src/config.h.in
--- 3.12-1.2/src/config.h.in	2015-11-11 15:10:03.000000000 +0000
+++ 3.15-1/src/config.h.in	2021-05-07 13:18:00.000000000 +0000
@@ -50,6 +50,9 @@
 /* Define if you have the strtol function.  */
 #undef HAVE_STRTOL
 
+/* Define if you have the strlcpy function.  */
+#undef HAVE_STRLCPY
+
 /* Define if you have the <asm/types.h> header file.  */
 #undef HAVE_ASM_TYPES_H
 
@@ -101,9 +104,6 @@
 /* Define if you have the <netpacket/packet.h> header file.  */
 #undef HAVE_NETPACKET_PACKET_H
 
-/* Define if you have the <sys/cdefs.h> header file.  */
-#undef HAVE_SYS_CDEFS_H
-
 /* Define if you have the <sys/dlpi.h> header file.  */
 #undef HAVE_SYS_DLPI_H
 
@@ -131,9 +131,6 @@
 /* Define if you have the N_HDLC line discipline in pty.h */
 #undef HAVE_N_HDLC
 
-/* Define if bitfields are packed in reverse order */
-#undef PACK_BITFIELDS_REVERSED
-
 /* Define to include debugging code */
 #undef DEBUGGING_ENABLED
 
diff -pruN 3.12-1.2/src/configure 3.15-1/src/configure
--- 3.12-1.2/src/configure	2015-11-11 15:10:03.000000000 +0000
+++ 3.15-1/src/configure	2021-05-07 13:18:00.000000000 +0000
@@ -634,8 +634,8 @@ TARGETS
 WRAPPER
 ID
 SETSID
-ECHO
 PPPD
+IP
 INSTALL_DATA
 INSTALL_SCRIPT
 INSTALL_PROGRAM
@@ -674,6 +674,7 @@ infodir
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -747,6 +748,7 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE}'
@@ -999,6 +1001,15 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1136,7 +1147,7 @@ fi
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
+		libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1289,6 +1300,7 @@ Fine tuning of the installation director
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -3676,7 +3688,7 @@ fi
 done
 
 
-for ac_header in fcntl.h sys/dlpi.h sys/ioctl.h sys/time.h syslog.h unistd.h net/if_arp.h netinet/if_ether.h getopt.h sys/uio.h sys/param.h fcntl.h net/bpf.h netpacket/packet.h net/ethernet.h asm/types.h linux/if_packet.h linux/if_ether.h sys/socket.h sys/cdefs.h net/if.h net/if_dl.h net/if_ether.h net/if_types.h netinet/if_ether.h net/if_types.h net/if_dl.h
+for ac_header in fcntl.h sys/dlpi.h sys/ioctl.h sys/time.h syslog.h unistd.h net/if_arp.h netinet/if_ether.h getopt.h sys/uio.h sys/param.h fcntl.h net/bpf.h netpacket/packet.h net/ethernet.h asm/types.h linux/if_packet.h linux/if_ether.h sys/socket.h net/if.h net/if_dl.h net/if_ether.h net/if_types.h netinet/if_ether.h net/if_types.h net/if_dl.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -3966,7 +3978,7 @@ if test "$ac_cv_pluginpath" = "yes" ; th
 fi
 
 if test "$ac_cv_pluginpath" = "yes" ; then
-    echo "*** Could not fined pppd/pppd.h anywhere... not building plugin"
+    echo "*** Could not find pppd/pppd.h anywhere... not building plugin"
     ac_cv_pluginpath=no
 fi
 
@@ -4129,7 +4141,7 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-for ac_func in select socket strerror strtol
+for ac_func in select socket strerror strtol strlcpy
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -4364,27 +4376,27 @@ _ACEOF
 
 
 
-# Extract the first word of "pppd", so it can be a program name with args.
-set dummy pppd; ac_word=$2
+# Extract the first word of "ip", so it can be a program name with args.
+set dummy ip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PPPD+:} false; then :
+if ${ac_cv_path_IP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $PPPD in
+  case $IP in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_PPPD="$PPPD" # Let the user override the test with a path.
+  ac_cv_path_IP="$IP" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/sbin:/usr/sbin:/usr/local/sbin"
+as_dummy="$PATH:/bin:/sbin:/usr/bin:/usr/sbin"
 for as_dir in $as_dummy
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PPPD="$as_dir/$ac_word$ac_exec_ext"
+    ac_cv_path_IP="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -4392,40 +4404,42 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_PPPD" && ac_cv_path_PPPD="NOTFOUND"
+  test -z "$ac_cv_path_IP" && ac_cv_path_IP="NOTFOUND"
   ;;
 esac
 fi
-PPPD=$ac_cv_path_PPPD
-if test -n "$PPPD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PPPD" >&5
-$as_echo "$PPPD" >&6; }
+IP=$ac_cv_path_IP
+if test -n "$IP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IP" >&5
+$as_echo "$IP" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-# Extract the first word of "echo", so it can be a program name with args.
-set dummy echo; ac_word=$2
+
+# Extract the first word of "pppd", so it can be a program name with args.
+set dummy pppd; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ECHO+:} false; then :
+if ${ac_cv_path_PPPD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $ECHO in
+  case $PPPD in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
+  ac_cv_path_PPPD="$PPPD" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
+as_dummy="$PATH:/sbin:/usr/sbin:/usr/local/sbin"
+for as_dir in $as_dummy
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
+    ac_cv_path_PPPD="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -4433,14 +4447,14 @@ done
   done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_ECHO" && ac_cv_path_ECHO="echo"
+  test -z "$ac_cv_path_PPPD" && ac_cv_path_PPPD="NOTFOUND"
   ;;
 esac
 fi
-ECHO=$ac_cv_path_ECHO
-if test -n "$ECHO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
-$as_echo "$ECHO" >&6; }
+PPPD=$ac_cv_path_PPPD
+if test -n "$PPPD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PPPD" >&5
+$as_echo "$PPPD" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -4550,13 +4564,11 @@ modprobe ppp_synctty > /dev/null 2>&1
 modprobe pppoe > /dev/null 2>&1
 fi
 if test "$cross_compiling" = yes; then :
-  ac_cv_linux_kernel_pppoe=no; $ECHO "cross-compiling, default: "
+  ac_cv_linux_kernel_pppoe=no; echo "cross-compiling, default: "
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/socket.h>
-#include <net/ethernet.h>
-#include <linux/if.h>
 #include <netinet/in.h>
 #include <linux/if_pppox.h>
 int main()
@@ -4640,59 +4652,6 @@ $as_echo "$as_me: WARNING: *** I will ke
 	;;
 esac
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking packing order of bit fields" >&5
-$as_echo_n "checking packing order of bit fields... " >&6; }
-if test "${rpppoe_cv_pack_bitfields+set}" != set ; then
-if test "$cross_compiling" = yes; then :
-  $ECHO "no defaults for cross-compiling"; exit 0
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-union foo {
-    struct bar {
-	unsigned int ver:4;
-	unsigned int type:4;
-    } bb;
-    unsigned char baz;
-};
-
-int
-main(void)
-{
-    union foo x;
-    x.bb.ver = 1;
-    x.bb.type = 2;
-    if (x.baz == 0x21) {
-	return 1;
-    } else if (x.baz == 0x12) {
-	return 0;
-    } else {
-	return 2;
-    }
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  rpppoe_cv_pack_bitfields=normal
-else
-  rpppoe_cv_pack_bitfields=rev
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-
-if test "$rpppoe_cv_pack_bitfields" = "rev" ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: reversed" >&5
-$as_echo "reversed" >&6; }
-	$as_echo "#define PACK_BITFIELDS_REVERSED 1" >>confdefs.h
-
-else
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: normal" >&5
-$as_echo "normal" >&6; }
-fi
-
 # Sigh... got to fix this up for tcl
 test "x$prefix" = xNONE && prefix=$ac_default_prefix
 # Let make expand exec_prefix.
@@ -4753,11 +4712,10 @@ LIBEVENT=../libevent
 
 
 
-
 datadir_evaluated=`eval echo $datadir`
 
 
-ac_config_files="$ac_config_files Makefile libevent/Makefile ../scripts/pppoe-connect ../scripts/pppoe-start ../scripts/pppoe-stop ../scripts/pppoe-init ../scripts/pppoe-init-suse ../scripts/pppoe-init-turbolinux ../scripts/pppoe-setup ../gui/Makefile ../gui/tkpppoe $EXTRACONFIGS"
+ac_config_files="$ac_config_files Makefile libevent/Makefile ../scripts/pppoe-connect ../scripts/pppoe-start ../scripts/pppoe-stop ../scripts/pppoe-init ../scripts/pppoe-init-suse ../scripts/pppoe-setup ../gui/Makefile ../gui/tkpppoe $EXTRACONFIGS"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -5457,7 +5415,6 @@ do
     "../scripts/pppoe-stop") CONFIG_FILES="$CONFIG_FILES ../scripts/pppoe-stop" ;;
     "../scripts/pppoe-init") CONFIG_FILES="$CONFIG_FILES ../scripts/pppoe-init" ;;
     "../scripts/pppoe-init-suse") CONFIG_FILES="$CONFIG_FILES ../scripts/pppoe-init-suse" ;;
-    "../scripts/pppoe-init-turbolinux") CONFIG_FILES="$CONFIG_FILES ../scripts/pppoe-init-turbolinux" ;;
     "../scripts/pppoe-setup") CONFIG_FILES="$CONFIG_FILES ../scripts/pppoe-setup" ;;
     "../gui/Makefile") CONFIG_FILES="$CONFIG_FILES ../gui/Makefile" ;;
     "../gui/tkpppoe") CONFIG_FILES="$CONFIG_FILES ../gui/tkpppoe" ;;
diff -pruN 3.12-1.2/src/configure.in 3.15-1/src/configure.in
--- 3.12-1.2/src/configure.in	2015-11-11 15:10:03.000000000 +0000
+++ 3.15-1/src/configure.in	2021-05-07 13:18:00.000000000 +0000
@@ -18,7 +18,7 @@ dnl Checks for libraries.
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(fcntl.h sys/dlpi.h sys/ioctl.h sys/time.h syslog.h unistd.h net/if_arp.h netinet/if_ether.h getopt.h sys/uio.h sys/param.h fcntl.h net/bpf.h netpacket/packet.h net/ethernet.h asm/types.h linux/if_packet.h linux/if_ether.h sys/socket.h sys/cdefs.h net/if.h net/if_dl.h net/if_ether.h net/if_types.h netinet/if_ether.h net/if_types.h net/if_dl.h)
+AC_CHECK_HEADERS(fcntl.h sys/dlpi.h sys/ioctl.h sys/time.h syslog.h unistd.h net/if_arp.h netinet/if_ether.h getopt.h sys/uio.h sys/param.h fcntl.h net/bpf.h netpacket/packet.h net/ethernet.h asm/types.h linux/if_packet.h linux/if_ether.h sys/socket.h net/if.h net/if_dl.h net/if_ether.h net/if_types.h netinet/if_ether.h net/if_types.h net/if_dl.h)
 AC_CHECK_HEADERS(linux/if.h, [], [], [#include<sys/socket.h>])
 AC_CHECK_HEADERS(linux/if_pppox.h, [], [],
 [
@@ -75,7 +75,7 @@ if test "$ac_cv_pluginpath" = "yes" ; th
 fi
 
 if test "$ac_cv_pluginpath" = "yes" ; then
-    echo "*** Could not fined pppd/pppd.h anywhere... not building plugin"
+    echo "*** Could not find pppd/pppd.h anywhere... not building plugin"
     ac_cv_pluginpath=no
 fi
 
@@ -134,7 +134,7 @@ dnl Checks for library functions.
 AC_FUNC_MEMCMP
 AC_FUNC_SETVBUF_REVERSED
 AC_TYPE_SIGNAL
-AC_CHECK_FUNCS(select socket strerror strtol)
+AC_CHECK_FUNCS(select socket strerror strtol strlcpy)
 AC_PROG_INSTALL
 
 dnl Integer sizes
@@ -142,9 +142,11 @@ AC_CHECK_SIZEOF(unsigned short)
 AC_CHECK_SIZEOF(unsigned int)
 AC_CHECK_SIZEOF(unsigned long)
 
+dnl Check for location of ip
+AC_PATH_PROG(IP, ip, NOTFOUND, $PATH:/bin:/sbin:/usr/bin:/usr/sbin)
+
 dnl Check for location of pppd
 AC_PATH_PROG(PPPD, pppd, NOTFOUND, $PATH:/sbin:/usr/sbin:/usr/local/sbin)
-AC_PATH_PROG(ECHO, echo, echo)
 
 dnl Check for setsid (probably Linux-specific)
 AC_PATH_PROG(SETSID, setsid, "", $PATH:/sbin:/usr/sbin:/usr/local/sbin)
@@ -166,8 +168,6 @@ modprobe ppp_synctty > /dev/null 2>&1
 modprobe pppoe > /dev/null 2>&1
 fi
 AC_TRY_RUN([#include <sys/socket.h>
-#include <net/ethernet.h>
-#include <linux/if.h>
 #include <netinet/in.h>
 #include <linux/if_pppox.h>
 int main()
@@ -175,7 +175,7 @@ int main()
 	if (socket(AF_PPPOX, SOCK_DGRAM, PX_PROTO_OE) >= 0) return 0; else return 1;
 }
 ],
-ac_cv_linux_kernel_pppoe=yes, ac_cv_linux_kernel_pppoe=no, [ac_cv_linux_kernel_pppoe=no; $ECHO "cross-compiling, default: "])
+ac_cv_linux_kernel_pppoe=yes, ac_cv_linux_kernel_pppoe=no, [ac_cv_linux_kernel_pppoe=no; echo "cross-compiling, default: "])
 else
 	ac_cv_linux_kernel_pppoe=no
 fi
@@ -231,42 +231,6 @@ case "$PPPD_VERSION" in
 	;;
 esac
 
-dnl Figure out packing order of structures
-AC_MSG_CHECKING([packing order of bit fields])
-if test "${rpppoe_cv_pack_bitfields+set}" != set ; then
-AC_TRY_RUN([
-union foo {
-    struct bar {
-	unsigned int ver:4;
-	unsigned int type:4;
-    } bb;
-    unsigned char baz;
-};
-
-int
-main(void)
-{
-    union foo x;
-    x.bb.ver = 1;
-    x.bb.type = 2;
-    if (x.baz == 0x21) {
-	return 1;
-    } else if (x.baz == 0x12) {
-	return 0;
-    } else {
-	return 2;
-    }
-}], rpppoe_cv_pack_bitfields=normal, rpppoe_cv_pack_bitfields=rev,
-$ECHO "no defaults for cross-compiling"; exit 0)
-fi
-
-if test "$rpppoe_cv_pack_bitfields" = "rev" ; then
-	AC_MSG_RESULT(reversed)
-	AC_DEFINE(PACK_BITFIELDS_REVERSED)
-else
-	AC_MSG_RESULT(normal)
-fi
-
 # Sigh... got to fix this up for tcl
 test "x$prefix" = xNONE && prefix=$ac_default_prefix
 # Let make expand exec_prefix.
@@ -325,13 +289,12 @@ AC_SUBST(LIC_DEFINE)
 AC_SUBST(PPPOE_SERVER_DEPS)
 AC_SUBST(RDYNAMIC)
 AC_SUBST(LIBEVENT)
-AC_SUBST(ECHO)
 AC_SUBST(LDFLAGS)
 
 datadir_evaluated=`eval echo $datadir`
 AC_SUBST(datadir_evaluated)
 
-AC_OUTPUT(Makefile libevent/Makefile ../scripts/pppoe-connect ../scripts/pppoe-start ../scripts/pppoe-stop ../scripts/pppoe-init ../scripts/pppoe-init-suse ../scripts/pppoe-init-turbolinux ../scripts/pppoe-setup ../gui/Makefile ../gui/tkpppoe $EXTRACONFIGS)
+AC_OUTPUT(Makefile libevent/Makefile ../scripts/pppoe-connect ../scripts/pppoe-start ../scripts/pppoe-stop ../scripts/pppoe-init ../scripts/pppoe-init-suse ../scripts/pppoe-setup ../gui/Makefile ../gui/tkpppoe $EXTRACONFIGS)
 
 AC_MSG_RESULT([On this platform, the following targets will be built:])
 AC_MSG_RESULT([$TARGETS])
diff -pruN 3.12-1.2/src/debug.c 3.15-1/src/debug.c
--- 3.12-1.2/src/debug.c	2015-11-11 15:10:03.000000000 +0000
+++ 3.15-1/src/debug.c	2021-05-07 13:18:00.000000000 +0000
@@ -7,6 +7,7 @@
 * Functions for printing debugging information
 *
 * Copyright (C) 2000 by Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This program may be distributed according to the terms of the GNU
 * General Public License, version 2 or (at your option) any later version.
@@ -15,9 +16,6 @@
 *
 ***********************************************************************/
 
-static char const RCSID[] =
-"$Id$";
-
 #include "pppoe.h"
 
 #ifdef DEBUGGING_ENABLED
diff -pruN 3.12-1.2/src/discovery.c 3.15-1/src/discovery.c
--- 3.12-1.2/src/discovery.c	2015-11-11 15:10:03.000000000 +0000
+++ 3.15-1/src/discovery.c	2021-05-07 13:18:00.000000000 +0000
@@ -5,13 +5,12 @@
 * Perform PPPoE discovery
 *
 * Copyright (C) 1999-2015 by Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * LIC: GPL
 *
 ***********************************************************************/
 
-static char const RCSID[] =
-"$Id$";
 #define _GNU_SOURCE 1
 
 #include "pppoe.h"
@@ -58,6 +57,34 @@ struct HostUniqInfo {
     int forMe;
 };
 
+/* Calculate time remaining until *expire_at into *tv, returns 0 if now >= *expire_at */
+static int
+time_left(struct timeval *tv, struct timeval *expire_at)
+{
+    struct timeval now;
+
+    if (gettimeofday(&now, NULL) < 0) {
+	fatalSys("gettimeofday (time_left)");
+    }
+    tv->tv_sec = expire_at->tv_sec - now.tv_sec;
+    tv->tv_usec = expire_at->tv_usec - now.tv_usec;
+    if (tv->tv_usec < 0) {
+	tv->tv_usec += 1000000;
+	if (tv->tv_sec) {
+	    tv->tv_sec--;
+	} else {
+	    /* Timed out */
+	    return 0;
+	}
+    }
+    if (tv->tv_sec <= 0 && tv->tv_usec <= 0) {
+	/* Timed out */
+	return 0;
+    }
+
+    return 1;
+}
+
 /**********************************************************************
 *%FUNCTION: parseForHostUniq
 *%ARGUMENTS:
@@ -225,8 +252,8 @@ parsePADOTags(UINT16_t type, UINT16_t le
 	    mru = ntohs(mru);
 	    if (mru >= ETH_PPPOE_MTU) {
 		if (lcp_allowoptions[0].mru > mru) lcp_allowoptions[0].mru = mru;
-               if (lcp_wantoptions[0].mru > mru) lcp_wantoptions[0].mru = mru;
-               conn->seenMaxPayload = 1;
+		if (lcp_wantoptions[0].mru > mru) lcp_wantoptions[0].mru = mru;
+		conn->seenMaxPayload = 1;
 	    }
 	}
 	break;
@@ -276,8 +303,8 @@ parsePADSTags(UINT16_t type, UINT16_t le
 	    mru = ntohs(mru);
 	    if (mru >= ETH_PPPOE_MTU) {
 		if (lcp_allowoptions[0].mru > mru) lcp_allowoptions[0].mru = mru;
-               if (lcp_wantoptions[0].mru > mru) lcp_wantoptions[0].mru = mru;
-               conn->seenMaxPayload = 1;
+		if (lcp_wantoptions[0].mru > mru) lcp_wantoptions[0].mru = mru;
+		conn->seenMaxPayload = 1;
 	    }
 	}
 	break;
@@ -316,8 +343,7 @@ sendPADI(PPPoEConnection *conn)
     memcpy(packet.ethHdr.h_source, conn->myEth, ETH_ALEN);
 
     packet.ethHdr.h_proto = htons(Eth_PPPOE_Discovery);
-    packet.ver = 1;
-    packet.type = 1;
+    packet.vertype = PPPOE_VER_TYPE(1, 1);
     packet.code = CODE_PADI;
     packet.session = 0;
 
@@ -393,7 +419,6 @@ waitForPADO(PPPoEConnection *conn, int t
     int r;
     struct timeval tv;
     struct timeval expire_at;
-    struct timeval now;
 
     PPPoEPacket packet;
     int len;
@@ -411,21 +436,7 @@ waitForPADO(PPPoEConnection *conn, int t
 
     do {
 	if (BPF_BUFFER_IS_EMPTY) {
-	    if (gettimeofday(&now, NULL) < 0) {
-		fatalSys("gettimeofday (waitForPADO)");
-	    }
-	    tv.tv_sec = expire_at.tv_sec - now.tv_sec;
-	    tv.tv_usec = expire_at.tv_usec - now.tv_usec;
-	    if (tv.tv_usec < 0) {
-		tv.tv_usec += 1000000;
-		if (tv.tv_sec) {
-		    tv.tv_sec--;
-		} else {
-		    /* Timed out */
-		    return;
-		}
-	    }
-	    if (tv.tv_sec <= 0 && tv.tv_usec <= 0) {
+	    if(!time_left(&tv, &expire_at)) {
 		/* Timed out */
 		return;
 	    }
@@ -472,8 +483,8 @@ waitForPADO(PPPoEConnection *conn, int t
 	if (!packetIsForMe(conn, &packet)) continue;
 
 	if (packet.code == CODE_PADO) {
-	    if (NOT_UNICAST(packet.ethHdr.h_source)) {
-		printErr("Ignoring PADO packet from non-unicast MAC address");
+	    if (BROADCAST(packet.ethHdr.h_source)) {
+		printErr("Ignoring PADO packet from broadcast MAC address");
 		continue;
 	    }
 #ifdef PLUGIN
@@ -552,8 +563,7 @@ sendPADR(PPPoEConnection *conn)
     memcpy(packet.ethHdr.h_source, conn->myEth, ETH_ALEN);
 
     packet.ethHdr.h_proto = htons(Eth_PPPOE_Discovery);
-    packet.ver = 1;
-    packet.type = 1;
+    packet.vertype = PPPOE_VER_TYPE(1, 1);
     packet.code = CODE_PADR;
     packet.session = 0;
 
@@ -637,7 +647,6 @@ waitForPADS(PPPoEConnection *conn, int t
     int r;
     struct timeval tv;
     struct timeval expire_at;
-    struct timeval now;
 
     PPPoEPacket packet;
     int len;
@@ -649,21 +658,7 @@ waitForPADS(PPPoEConnection *conn, int t
 
     do {
 	if (BPF_BUFFER_IS_EMPTY) {
-	    if (gettimeofday(&now, NULL) < 0) {
-		fatalSys("gettimeofday (waitForPADS)");
-	    }
-	    tv.tv_sec = expire_at.tv_sec - now.tv_sec;
-	    tv.tv_usec = expire_at.tv_usec - now.tv_usec;
-	    if (tv.tv_usec < 0) {
-		tv.tv_usec += 1000000;
-		if (tv.tv_sec) {
-		    tv.tv_sec--;
-		} else {
-		    /* Timed out */
-		    return;
-		}
-	    }
-	    if (tv.tv_sec <= 0 && tv.tv_usec <= 0) {
+	    if(!time_left(&tv, &expire_at)) {
 		/* Timed out */
 		return;
 	    }
@@ -766,12 +761,12 @@ discovery(PPPoEConnection *conn)
     do {
 	padiAttempts++;
 	if (padiAttempts > MAX_PADI_ATTEMPTS) {
+	    printErr("Timeout waiting for PADO packets");
 	    if (persist) {
 		padiAttempts = 0;
 		timeout = conn->discoveryTimeout;
-		printErr("Timeout waiting for PADO packets");
 	    } else {
-		rp_fatal("Timeout waiting for PADO packets");
+		return;
 	    }
 	}
 	sendPADI(conn);
@@ -799,14 +794,14 @@ discovery(PPPoEConnection *conn)
     do {
 	padrAttempts++;
 	if (padrAttempts > MAX_PADI_ATTEMPTS) {
+	    printErr("Timeout waiting for PADS packets");
 	    if (persist) {
 		padrAttempts = 0;
 		timeout = conn->discoveryTimeout;
-		printErr("Timeout waiting for PADS packets");
 		/* Go back to sending PADI again */
 		goto SEND_PADI;
 	    } else {
-		rp_fatal("Timeout waiting for PADS packets");
+		return;
 	    }
 	}
 	sendPADR(conn);
diff -pruN 3.12-1.2/src/if.c 3.15-1/src/if.c
--- 3.12-1.2/src/if.c	2015-11-11 15:10:03.000000000 +0000
+++ 3.15-1/src/if.c	2021-05-07 13:18:00.000000000 +0000
@@ -7,6 +7,7 @@
 * Functions for opening a raw socket and reading/writing raw Ethernet frames.
 *
 * Copyright (C) 2000-2012 by Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This program may be distributed according to the terms of the GNU
 * General Public License, version 2 or (at your option) any later version.
@@ -15,10 +16,12 @@
 *
 ***********************************************************************/
 
-static char const RCSID[] =
-"$Id$";
-
 #include "pppoe.h"
+#if defined(HAVE_LINUX_IF_H)
+#include <linux/if.h>
+#elif defined(HAVE_NET_IF_H)
+#include <net/if.h>
+#endif
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
@@ -323,7 +326,7 @@ openInterface(char const *ifname, UINT16
     }
 
     /* Check that the interface is up */
-    strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
+    strlcpy(ifr.ifr_name, ifname, IFNAMSIZ);
     if (ioctl(sock, SIOCGIFFLAGS, &ifr) < 0) {
 	fatalSys("ioctl(SIOCGIFFLAGS)");
     }
@@ -342,7 +345,7 @@ openInterface(char const *ifname, UINT16
 
     /* Sanity check on MTU -- apparently does not work on OpenBSD */
 #if !defined(__OpenBSD__)
-    strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
+    strlcpy(ifr.ifr_name, ifname, IFNAMSIZ);
     if (ioctl(sock, SIOCGIFMTU, &ifr) < 0) {
 	fatalSys("ioctl(SIOCGIFMTU)");
     }
@@ -387,7 +390,7 @@ openInterface(char const *ifname, UINT16
     }
 
     /* Bind the interface to the filter */
-    strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
+    strlcpy(ifr.ifr_name, ifname, IFNAMSIZ);
     if (ioctl(fd, BIOCSETIF, &ifr) < 0) {
 	char buffer[256];
 	sprintf(buffer, "ioctl(BIOCSETIF) can't select interface %.16s",
@@ -456,7 +459,7 @@ openInterface(char const *ifname, UINT16
 
     /* Fill in hardware address */
     if (hwaddr) {
-	strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
+	strlcpy(ifr.ifr_name, ifname, IFNAMSIZ);
 	if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) {
 	    fatalSys("ioctl(SIOCGIFHWADDR)");
 	}
@@ -478,7 +481,7 @@ openInterface(char const *ifname, UINT16
     }
 
     /* Sanity check on MTU */
-    strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
+    strlcpy(ifr.ifr_name, ifname, IFNAMSIZ);
     if (ioctl(fd, SIOCGIFMTU, &ifr) < 0) {
 	fatalSys("ioctl(SIOCGIFMTU)");
     }
@@ -495,7 +498,7 @@ openInterface(char const *ifname, UINT16
     sa.sll_family = AF_PACKET;
     sa.sll_protocol = htons(type);
 
-    strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
+    strlcpy(ifr.ifr_name, ifname, IFNAMSIZ);
     if (ioctl(fd, SIOCGIFINDEX, &ifr) < 0) {
 	fatalSys("ioctl(SIOCFIGINDEX): Could not get interface index");
     }
@@ -714,7 +717,7 @@ openInterface(char const *ifname, UINT16
     int fd;
     long buf[MAXDLBUF];
 
-	union   DL_primitives   *dlp;
+    union   DL_primitives   *dlp;
 
     char base_dev[PATH_MAX];
     int ppa;
@@ -728,8 +731,7 @@ openInterface(char const *ifname, UINT16
     }
 
     ppa = atoi(&ifname[strlen(ifname)-1]);
-    strncpy(base_dev, ifname, PATH_MAX);
-    base_dev[strlen(base_dev)-1] = '\0';
+    strlcpy(base_dev, ifname, PATH_MAX);
 
 /* rearranged order of DLPI code - delphys 20010803 */
     dlp = (union DL_primitives*) buf;
diff -pruN 3.12-1.2/src/libevent/event.c 3.15-1/src/libevent/event.c
--- 3.12-1.2/src/libevent/event.c	2015-11-11 15:10:04.000000000 +0000
+++ 3.15-1/src/libevent/event.c	2021-05-07 13:18:00.000000000 +0000
@@ -6,6 +6,7 @@
 * easier.
 *
 * Copyright (C) 2001 Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This program may be distributed according to the terms of the GNU
 * General Public License, version 2 or (at your option) any later version.
@@ -14,9 +15,6 @@
 *
 ***********************************************************************/
 
-static char const RCSID[] =
-"$Id$";
-
 #include "event.h"
 #include <stdlib.h>
 #include <errno.h>
diff -pruN 3.12-1.2/src/libevent/event.h 3.15-1/src/libevent/event.h
--- 3.12-1.2/src/libevent/event.h	2015-11-11 15:10:05.000000000 +0000
+++ 3.15-1/src/libevent/event.h	2021-05-07 13:18:00.000000000 +0000
@@ -6,6 +6,7 @@
 * easier.
 *
 * Copyright (C) 2001 Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This program may be distributed according to the terms of the GNU
 * General Public License, version 2 or (at your option) any later version.
diff -pruN 3.12-1.2/src/libevent/eventpriv.h 3.15-1/src/libevent/eventpriv.h
--- 3.12-1.2/src/libevent/eventpriv.h	2015-11-11 15:10:05.000000000 +0000
+++ 3.15-1/src/libevent/eventpriv.h	2021-05-07 13:18:00.000000000 +0000
@@ -7,6 +7,7 @@
 * of the event-handling code should not care about.
 *
 * Copyright (C) 2001 Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This program may be distributed according to the terms of the GNU
 * General Public License, version 2 or (at your option) any later version.
diff -pruN 3.12-1.2/src/libevent/event_sig.c 3.15-1/src/libevent/event_sig.c
--- 3.12-1.2/src/libevent/event_sig.c	2015-11-11 15:10:05.000000000 +0000
+++ 3.15-1/src/libevent/event_sig.c	2021-05-07 13:18:00.000000000 +0000
@@ -6,6 +6,7 @@
 * with reaping child processes.
 *
 * Copyright (C) 2002 by Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This software may be distributed under the terms of the GNU General
 * Public License, Version 2, or (at your option) any later version.
@@ -14,11 +15,7 @@
 *
 ***********************************************************************/
 
-static char const RCSID[] =
-"$Id$";
-
 #define _POSIX_SOURCE 1 /* For sigaction defines */
-#define _BSD_SOURCE   1 /* For SA_RESTART */
 
 #include <signal.h>
 #include <sys/types.h>
diff -pruN 3.12-1.2/src/libevent/event_tcp.c 3.15-1/src/libevent/event_tcp.c
--- 3.12-1.2/src/libevent/event_tcp.c	2015-11-11 15:10:05.000000000 +0000
+++ 3.15-1/src/libevent/event_tcp.c	2021-05-07 13:18:00.000000000 +0000
@@ -3,6 +3,7 @@
 * event_tcp.c -- implementation of event-driven socket I/O.
 *
 * Copyright (C) 2001 Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This program may be distributed according to the terms of the GNU
 * General Public License, version 2 or (at your option) any later version.
@@ -11,9 +12,6 @@
 *
 ***********************************************************************/
 
-static char const RCSID[] =
-"$Id$";
-
 #include "event_tcp.h"
 #include <unistd.h>
 #include <fcntl.h>
diff -pruN 3.12-1.2/src/libevent/event_tcp.h 3.15-1/src/libevent/event_tcp.h
--- 3.12-1.2/src/libevent/event_tcp.h	2015-11-11 15:10:05.000000000 +0000
+++ 3.15-1/src/libevent/event_tcp.h	2021-05-07 13:18:00.000000000 +0000
@@ -6,8 +6,7 @@
 * server.
 *
 * Copyright (C) 2001 Roaring Penguin Software Inc.
-*
-* $Id$
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This program may be distributed according to the terms of the GNU
 * General Public License, version 2 or (at your option) any later version.
diff -pruN 3.12-1.2/src/libevent/hash.c 3.15-1/src/libevent/hash.c
--- 3.12-1.2/src/libevent/hash.c	2015-11-11 15:10:05.000000000 +0000
+++ 3.15-1/src/libevent/hash.c	2021-05-07 13:18:00.000000000 +0000
@@ -6,6 +6,7 @@
 * a hash_bucket member.
 *
 * Copyright (C) 2002 Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This software may be distributed under the terms of the GNU General
 * Public License, Version 2 or (at your option) any later version.
@@ -14,9 +15,6 @@
 *
 ***********************************************************************/
 
-static char const RCSID[] =
-"$Id$";
-
 #include "hash.h"
 
 #include <limits.h>
diff -pruN 3.12-1.2/src/libevent/hash.h 3.15-1/src/libevent/hash.h
--- 3.12-1.2/src/libevent/hash.h	2015-11-11 15:10:05.000000000 +0000
+++ 3.15-1/src/libevent/hash.h	2021-05-07 13:18:00.000000000 +0000
@@ -5,6 +5,7 @@
 * Hash table utilities
 *
 * Copyright (C) 2002 Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * LIC: GPL
 *
diff -pruN 3.12-1.2/src/libevent/Makefile.in 3.15-1/src/libevent/Makefile.in
--- 3.12-1.2/src/libevent/Makefile.in	2015-11-11 15:10:04.000000000 +0000
+++ 3.15-1/src/libevent/Makefile.in	2021-05-07 13:18:00.000000000 +0000
@@ -4,6 +4,7 @@
 # Makefile for event-handling library
 #
 # Copyright 2002 Roaring Penguin Software Inc.
+# Copyright (C) 2018-2021 Dianne Skoll
 #
 # This software may be distributed according to the terms of the GNU
 # General Public License, version 2 or (at your option) any later version.
diff -pruN 3.12-1.2/src/Makefile.in 3.15-1/src/Makefile.in
--- 3.12-1.2/src/Makefile.in	2015-11-11 15:10:02.000000000 +0000
+++ 3.15-1/src/Makefile.in	2021-05-07 13:18:00.000000000 +0000
@@ -6,6 +6,7 @@
 # Makefile for Roaring Penguin's Linux user-space PPPoE client.
 #
 # Copyright (C) 2000 Roaring Penguin Software Inc.
+# Copyright (C) 2018-2021 Dianne Skoll
 #
 # This program may be distributed according to the terms of the GNU
 # General Public License, version 2 or (at your option) any later version.
@@ -16,16 +17,17 @@
 #***********************************************************************
 
 # Version is set ONLY IN THE MAKEFILE!  Don't delete this!
-VERSION=3.12
+RP_VERSION=3.15
 
 DEFINES=
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 mandir=@mandir@
-docdir=@prefix@/share/doc/rp-pppoe-$(VERSION)
+docdir=@prefix@/share/doc/rp-pppoe-$(RP_VERSION)
 install=@INSTALL@
 install_dir=@INSTALL@ -d
 sbindir=@sbindir@
+datarootdir=@datarootdir@
 
 # Plugin for pppd on Linux
 LINUX_KERNELMODE_PLUGIN=@LINUX_KERNELMODE_PLUGIN@
@@ -85,50 +87,50 @@ pppoe-relay: relay.o if.o debug.o common
 	@CC@ -o $@ $^ $(LDFLAGS)
 
 pppoe.o: pppoe.c pppoe.h
-	@CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ $<
+	@CC@ $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -c -o $@ $<
 
 discovery.o: discovery.c pppoe.h
-	@CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ $<
+	@CC@ $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -c -o $@ $<
 
 ppp.o: ppp.c pppoe.h
-	@CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ $<
+	@CC@ $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -c -o $@ $<
 
 md5.o: md5.c md5.h
-	@CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ $<
+	@CC@ $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -c -o $@ $<
 
 pppoe-server.o: pppoe-server.c pppoe.h @PPPOE_SERVER_DEPS@
-	@CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ $<
+	@CC@ $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -c -o $@ $<
 
 # Experimental code from Savoir Faire Linux.  I do not consider it
 # production-ready, so not part of the official distribution.
 #pppoe-bridge.o: pppoe-bridge.c pppoe.h @PPPOE_SERVER_DEPS@
-#	@CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ $<
+#	@CC@ $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -c -o $@ $<
 
 pppoe-sniff.o: pppoe-sniff.c pppoe.h
-	@CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ $<
+	@CC@ $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -c -o $@ $<
 
 if.o: if.c pppoe.h
-	@CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ $<
+	@CC@ $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -c -o $@ $<
 
 libevent/libevent.a:
 	cd libevent && $(MAKE) DEFINES="$(DEFINES)"
 
 common.o: common.c pppoe.h
-	@CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ $<
+	@CC@ $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -c -o $@ $<
 
 debug.o: debug.c pppoe.h
-	@CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ $<
+	@CC@ $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -c -o $@ $<
 
 relay.o: relay.c relay.h pppoe.h
-	@CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ $<
+	@CC@ $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -c -o $@ $<
 
 # Experimental code from Savoir Faire Linux.  I do not consider it
 # production-ready, so not part of the official distribution.
 #modem.o: modem.c modem.h
-#	@CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ $<
+#	@CC@ $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -c -o $@ $<
 
 #rs232.o: rs232.c rs232.h
-#	@CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ $<
+#	@CC@ $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -c -o $@ $<
 
 
 # Linux-specific plugin
@@ -136,22 +138,22 @@ rp-pppoe.so: plugin/plugin.o plugin/libp
 	@CC@ -o $@ -shared $^ $(LDFLAGS)
 
 plugin/plugin.o: plugin.c
-	@CC@ -DPLUGIN=1 '-DRP_VERSION="$(VERSION)"' $(CFLAGS) -I$(PPPD_INCDIR) -c -o $@ -fPIC $<
+	@CC@ -DPLUGIN=1 '-DRP_VERSION="$(RP_VERSION)"' $(CFLAGS) -I$(PPPD_INCDIR) -c -o $@ -fPIC $<
 
 plugin/libplugin.a: plugin/discovery.o plugin/if.o plugin/common.o plugin/debug.o
 	ar -rc $@ $^
 
 plugin/discovery.o: discovery.c
-	@CC@ -DPLUGIN=1 $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ -fPIC $<
+	@CC@ -DPLUGIN=1 $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -I$(PPPD_INCDIR) -c -o $@ -fPIC $<
 
 plugin/if.o: if.c
-	@CC@ -DPLUGIN=1 $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ -fPIC $<
+	@CC@ -DPLUGIN=1 $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -I$(PPPD_INCDIR) -c -o $@ -fPIC $<
 
 plugin/debug.o: debug.c
-	@CC@ -DPLUGIN=1 $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ -fPIC $<
+	@CC@ -DPLUGIN=1 $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -I$(PPPD_INCDIR) -c -o $@ -fPIC $<
 
 plugin/common.o: common.c
-	@CC@ -DPLUGIN=1 $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o $@ -fPIC $<
+	@CC@ -DPLUGIN=1 $(CFLAGS) '-DRP_VERSION="$(RP_VERSION)"' -I$(PPPD_INCDIR) -c -o $@ -fPIC $<
 
 install: all
 	-mkdir -p $(DESTDIR)$(sbindir)
@@ -189,13 +191,13 @@ install: all
 	-mkdir -p $(DESTDIR)/etc/ppp
 	-mkdir -p $(DESTDIR)$(PLUGIN_DIR)
 	-echo "# Directory created by rp-pppoe for kernel-mode plugin" > $(DESTDIR)$(PLUGIN_DIR)/README
-	@if test -r rp-pppoe.so; then $(install) -m 755 rp-pppoe.so $(DESTDIR)$(PLUGIN_DIR); fi
+	if test -r rp-pppoe.so; then $(install) -m 755 rp-pppoe.so $(DESTDIR)$(PLUGIN_DIR); fi
 	@for i in pppoe.conf firewall-standalone firewall-masq ; do \
 		if [ ! -f $(DESTDIR)/etc/ppp/$$i ] ; then \
 			$(install) -m 644 ../configs/$$i $(DESTDIR)/etc/ppp ; \
 		else \
 			echo "NOT overwriting existing $(DESTDIR)/etc/ppp/$$i" ;\
-			$(install) -m 644 ../configs/$$i $(DESTDIR)/etc/ppp/$$i-$(VERSION) ;\
+			$(install) -m 644 ../configs/$$i $(DESTDIR)/etc/ppp/$$i-$(RP_VERSION) ;\
 		fi ;\
 	done
 	@if [ ! -f $(DESTDIR)$(PPPOESERVER_PPPD_OPTIONS) ] ; then \
@@ -209,11 +211,6 @@ install: all
 		mkdir -p $(DESTDIR)/etc/rc.d/init.d ;\
 		$(install) -m 755 ../scripts/pppoe-init $(DESTDIR)/etc/rc.d/init.d/pppoe ; \
 	fi
-	@if [ -f /etc/turbolinux-release ] ; then \
-		echo "Looks like a TurboLinux system; installing $(DESTDIR)/etc/rc.d/init.d/pppoe" ; \
-		mkdir -p $(DESTDIR)/etc/rc.d/init.d ;\
-		$(install) -m 755 ../scripts/pppoe-init-turbolinux $(DESTDIR)/etc/rc.d/init.d/pppoe ; \
-	fi
 	@if [ -f /etc/SuSE-release ] ; then \
 		echo "Looks like a SuSE Linux system; installing $(DESTDIR)/etc/rc.d/init.d/pppoe" ; \
 		mkdir -p $(DESTDIR)/etc/rc.d/init.d ;\
@@ -230,59 +227,59 @@ install: all
 	@echo "Type 'pppoe-setup' to configure the software."
 
 servpoet-tgz: distro-servpoet
-	cd .. && tar cvf servpoet-$(VERSION)$(BETA).tar servpoet-$(VERSION)$(BETA)
-	gzip -f -v -9 ../servpoet-$(VERSION)$(BETA).tar
-	rm -rf ../servpoet-$(VERSION)$(BETA)
+	cd .. && tar cvf servpoet-$(RP_VERSION)$(BETA).tar servpoet-$(RP_VERSION)$(BETA)
+	gzip -f -v -9 ../servpoet-$(RP_VERSION)$(BETA).tar
+	rm -rf ../servpoet-$(RP_VERSION)$(BETA)
 
 tgz: distro
-	cd .. && tar cvf rp-pppoe-$(VERSION)$(BETA).tar rp-pppoe-$(VERSION)$(BETA)
-	gzip -f -v -9 ../rp-pppoe-$(VERSION)$(BETA).tar
-	rm -rf ../rp-pppoe-$(VERSION)$(BETA)
+	cd .. && tar cvf rp-pppoe-$(RP_VERSION)$(BETA).tar rp-pppoe-$(RP_VERSION)$(BETA)
+	gzip -f -v -9 ../rp-pppoe-$(RP_VERSION)$(BETA).tar
+	rm -rf ../rp-pppoe-$(RP_VERSION)$(BETA)
 
 distro-servpoet: distro
-	cp ../servpoet.spec ../rp-pppoe-$(VERSION)$(BETA)
-	$(MAKE) -C licensed-only distro VERSION=$(VERSION) BETA=$(BETA)
-	mv ../rp-pppoe-$(VERSION)$(BETA) ../servpoet-$(VERSION)$(BETA)
+	cp ../servpoet.spec ../rp-pppoe-$(RP_VERSION)$(BETA)
+	$(MAKE) -C licensed-only distro RP_VERSION=$(RP_VERSION) BETA=$(BETA)
+	mv ../rp-pppoe-$(RP_VERSION)$(BETA) ../servpoet-$(RP_VERSION)$(BETA)
 
 distro:
-	rm -rf ../rp-pppoe-$(VERSION)$(BETA)
-	mkdir ../rp-pppoe-$(VERSION)$(BETA)
+	rm -rf ../rp-pppoe-$(RP_VERSION)$(BETA)
+	mkdir ../rp-pppoe-$(RP_VERSION)$(BETA)
 	for i in README SERVPOET go go-gui rp-pppoe.spec ; do \
-		cp ../$$i ../rp-pppoe-$(VERSION)$(BETA) || exit 1; \
+		cp ../$$i ../rp-pppoe-$(RP_VERSION)$(BETA) || exit 1; \
 	done
-	mkdir ../rp-pppoe-$(VERSION)$(BETA)/gui
+	mkdir ../rp-pppoe-$(RP_VERSION)$(BETA)/gui
 	for i in en.msg ja.msg Makefile.in tkpppoe.in wrapper.c tkpppoe.1 pppoe-wrapper.1 ; do \
-		cp ../gui/$$i ../rp-pppoe-$(VERSION)$(BETA)/gui || exit 1; \
+		cp ../gui/$$i ../rp-pppoe-$(RP_VERSION)$(BETA)/gui || exit 1; \
 	done
-	mkdir ../rp-pppoe-$(VERSION)$(BETA)/gui/html
+	mkdir ../rp-pppoe-$(RP_VERSION)$(BETA)/gui/html
 	for i in mainwin-busy.png mainwin-nonroot.png mainwin.png props-advanced.png props-basic.png props-nic.png props-options.png tkpppoe.html ; do \
-		cp ../gui/html/$$i ../rp-pppoe-$(VERSION)$(BETA)/gui/html || exit 1; \
+		cp ../gui/html/$$i ../rp-pppoe-$(RP_VERSION)$(BETA)/gui/html || exit 1; \
 	done
-	mkdir ../rp-pppoe-$(VERSION)$(BETA)/configs
+	mkdir ../rp-pppoe-$(RP_VERSION)$(BETA)/configs
 	for i in firewall-masq firewall-standalone pap-secrets pppoe-server-options pppoe.conf ; do \
-		cp ../configs/$$i ../rp-pppoe-$(VERSION)$(BETA)/configs || exit 1; \
+		cp ../configs/$$i ../rp-pppoe-$(RP_VERSION)$(BETA)/configs || exit 1; \
 	done
-	mkdir ../rp-pppoe-$(VERSION)$(BETA)/doc
+	mkdir ../rp-pppoe-$(RP_VERSION)$(BETA)/doc
 	for i in CHANGES KERNEL-MODE-PPPOE HOW-TO-CONNECT LICENSE PROBLEMS ; do \
-		cp ../doc/$$i ../rp-pppoe-$(VERSION)$(BETA)/doc || exit 1; \
+		cp ../doc/$$i ../rp-pppoe-$(RP_VERSION)$(BETA)/doc || exit 1; \
 	done
-	mkdir ../rp-pppoe-$(VERSION)$(BETA)/man
+	mkdir ../rp-pppoe-$(RP_VERSION)$(BETA)/man
 	for i in pppoe-connect.8 pppoe-setup.8 pppoe-start.8 pppoe-status.8 pppoe-stop.8 pppoe-server.8 pppoe-sniff.8 pppoe.8 pppoe-relay.8 pppoe.conf.5 ; do \
-		cp ../man/$$i ../rp-pppoe-$(VERSION)$(BETA)/man || exit 1; \
+		cp ../man/$$i ../rp-pppoe-$(RP_VERSION)$(BETA)/man || exit 1; \
 	done
-	mkdir ../rp-pppoe-$(VERSION)$(BETA)/scripts
-	for i in pppoe-connect.in pppoe-init-suse.in pppoe-init-turbolinux.in pppoe-init.in pppoe-setup.in pppoe-start.in pppoe-stop.in pppoe-status ; do \
-		cp ../scripts/$$i ../rp-pppoe-$(VERSION)$(BETA)/scripts || exit 1; \
+	mkdir ../rp-pppoe-$(RP_VERSION)$(BETA)/scripts
+	for i in pppoe-connect.in pppoe-init-suse.in pppoe-init.in pppoe-setup.in pppoe-start.in pppoe-stop.in pppoe-status ; do \
+		cp ../scripts/$$i ../rp-pppoe-$(RP_VERSION)$(BETA)/scripts || exit 1; \
 	done
-	mkdir ../rp-pppoe-$(VERSION)$(BETA)/src
+	mkdir ../rp-pppoe-$(RP_VERSION)$(BETA)/src
 	for i in Makefile.in install-sh common.c config.h.in configure configure.in debug.c discovery.c if.c md5.c md5.h ppp.c pppoe-server.c pppoe-sniff.c pppoe.c pppoe.h pppoe-server.h plugin.c relay.c relay.h ; do \
-		cp ../src/$$i ../rp-pppoe-$(VERSION)$(BETA)/src || exit 1; \
+		cp ../src/$$i ../rp-pppoe-$(RP_VERSION)$(BETA)/src || exit 1; \
 	done
-	mkdir ../rp-pppoe-$(VERSION)$(BETA)/src/libevent
+	mkdir ../rp-pppoe-$(RP_VERSION)$(BETA)/src/libevent
 	for i in Makefile.in event.c event.h event_tcp.c event_tcp.h eventpriv.h hash.c hash.h event_sig.c ; do \
-		cp ../src/libevent/$$i ../rp-pppoe-$(VERSION)$(BETA)/src/libevent || exit 1; \
+		cp ../src/libevent/$$i ../rp-pppoe-$(RP_VERSION)$(BETA)/src/libevent || exit 1; \
 	done
-	mkdir ../rp-pppoe-$(VERSION)$(BETA)/src/plugin
+	mkdir ../rp-pppoe-$(RP_VERSION)$(BETA)/src/plugin
 
 distro-beta: beta-check
 	$(MAKE) distro BETA=-BETA-$(BETA)
@@ -297,16 +294,16 @@ beta-check:
 	fi
 
 rpms: tgz
-	cp ../rp-pppoe-$(VERSION).tar.gz /usr/src/redhat/SOURCES
-	gpg --detach-sign /usr/src/redhat/SOURCES/rp-pppoe-$(VERSION).tar.gz
+	cp ../rp-pppoe-$(RP_VERSION).tar.gz /usr/src/redhat/SOURCES
+	gpg --detach-sign /usr/src/redhat/SOURCES/rp-pppoe-$(RP_VERSION).tar.gz
 	cd ..; \
 	rpm -ba rp-pppoe.spec
-	rpm --addsign /usr/src/redhat/SRPMS/rp-pppoe-$(VERSION)-1.src.rpm \
-		/usr/src/redhat/RPMS/i386/rp-pppoe-$(VERSION)-1.i386.rpm \
-		/usr/src/redhat/RPMS/i386/rp-pppoe-gui-$(VERSION)-1.i386.rpm
+	rpm --addsign /usr/src/redhat/SRPMS/rp-pppoe-$(RP_VERSION)-1.src.rpm \
+		/usr/src/redhat/RPMS/i386/rp-pppoe-$(RP_VERSION)-1.i386.rpm \
+		/usr/src/redhat/RPMS/i386/rp-pppoe-gui-$(RP_VERSION)-1.i386.rpm
 
 servpoet-rpms: servpoet-tgz
-	cp ../servpoet-$(VERSION).tar.gz /usr/src/redhat/SOURCES
+	cp ../servpoet-$(RP_VERSION).tar.gz /usr/src/redhat/SOURCES
 	cd .. && rpm -ba servpoet.spec
 
 clean:
@@ -318,20 +315,20 @@ clean:
 distclean: clean
 	rm -f Makefile config.h config.cache config.log config.status
 	rm -f libevent/Makefile
-	rm -f ../scripts/pppoe-connect ../scripts/pppoe-start ../scripts/pppoe-stop ../scripts/pppoe-init ../scripts/pppoe-setup ../scripts/pppoe-init-suse ../scripts/pppoe-init-turbolinux
+	rm -f ../scripts/pppoe-connect ../scripts/pppoe-start ../scripts/pppoe-stop ../scripts/pppoe-init ../scripts/pppoe-setup ../scripts/pppoe-init-suse
 
 update-version:
-	sed -e 's/^Version: .*$$/Version: $(VERSION)/' ../rp-pppoe.spec > ../rp-pppoe.spec.new && mv ../rp-pppoe.spec.new ../rp-pppoe.spec
-	sed -e 's+^Source: .*$$+Source: http://www.roaringpenguin.com/pppoe/rp-pppoe-$(VERSION).tar.gz+' ../rp-pppoe.spec > ../rp-pppoe.spec.new && mv ../rp-pppoe.spec.new ../rp-pppoe.spec
-	test -f ../servpoet.spec && sed -e 's/^Version: .*$$/Version: $(VERSION)/' ../servpoet.spec > ../servpoet.spec.new && mv ../servpoet.spec.new ../servpoet.spec || true
-	test -f ../servpoet.spec && sed -e 's+^Source: .*$$+Source: http://www.roaringpenguin.com/pppoe/servpoet-$(VERSION).tar.gz+' ../servpoet.spec > ../servpoet.spec.new && mv ../servpoet.spec.new ../servpoet.spec || true
+	sed -e 's/^Version: .*$$/Version: $(RP_VERSION)/' ../rp-pppoe.spec > ../rp-pppoe.spec.new && mv ../rp-pppoe.spec.new ../rp-pppoe.spec
+	sed -e 's+^Source: .*$$+Source: https://dianne.skoll.ca/projects/rp-pppoe/download/rp-pppoe-$(RP_VERSION).tar.gz+' ../rp-pppoe.spec > ../rp-pppoe.spec.new && mv ../rp-pppoe.spec.new ../rp-pppoe.spec
+	test -f ../servpoet.spec && sed -e 's/^Version: .*$$/Version: $(RP_VERSION)/' ../servpoet.spec > ../servpoet.spec.new && mv ../servpoet.spec.new ../servpoet.spec || true
+	test -f ../servpoet.spec && sed -e 's+^Source: .*$$+Source: https://dianne.skoll.ca/projects/rp-pppoe/download/servpoet-$(RP_VERSION).tar.gz+' ../servpoet.spec > ../servpoet.spec.new && mv ../servpoet.spec.new ../servpoet.spec || true
 
 # Convenience target for Dianne!  Don't try to use this one.
 km:
 	./configure --enable-plugin=/home/dfs/Archive/PPP/ppp-2.4.0.pppoe4-patched-dfs
 
 licensed-only:
-	$(MAKE) -C licensed-only all VERSION=$(VERSION) SERVPOET_VERSION=$(SERVPOET_VERSION)
+	$(MAKE) -C licensed-only all RP_VERSION=$(RP_VERSION) SERVPOET_VERSION=$(SERVPOET_VERSION)
 
 l2tp: libevent/libevent.a
 	$(MAKE) -C l2tp all
diff -pruN 3.12-1.2/src/plugin.c 3.15-1/src/plugin.c
--- 3.12-1.2/src/plugin.c	2015-11-11 15:10:04.000000000 +0000
+++ 3.15-1/src/plugin.c	2021-05-07 13:18:00.000000000 +0000
@@ -5,6 +5,7 @@
 * pppd plugin for kernel-mode PPPoE on Linux
 *
 * Copyright (C) 2001-2012 by Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 * Portions copyright 2000 Michal Ostrowski and Jamal Hadi Salim.
 *
 * Much code and many ideas derived from pppoe plugin by Michal
@@ -24,9 +25,6 @@
 *
 ***********************************************************************/
 
-static char const RCSID[] =
-"$Id$";
-
 #define _GNU_SOURCE 1
 #include "pppoe.h"
 
@@ -42,6 +40,11 @@ static char const RCSID[] =
 #include <sys/ioctl.h>
 #include <sys/types.h>
 #include <sys/socket.h>
+#if defined(HAVE_LINUX_IF_H)
+#include <linux/if.h>
+#elif defined(HAVE_NET_IF_H)
+#include <net/if.h>
+#endif
 #include <sys/stat.h>
 #include <string.h>
 #include <stdlib.h>
@@ -91,7 +94,7 @@ static option_t Options[] = {
       "Only connect to specified MAC address" },
     { NULL }
 };
-int (*OldDevnameHook)(char *cmd, char **argv, int doit) = NULL;
+
 static PPPoEConnection *conn = NULL;
 
 /**********************************************************************
@@ -161,7 +164,7 @@ PPPOEConnectDevice(void)
 	error("Can't get MTU for %s: %m", conn->ifName);
 	return -1;
     }
-    strncpy(ifr.ifr_name, conn->ifName, sizeof(ifr.ifr_name));
+    strlcpy(ifr.ifr_name, conn->ifName, sizeof(ifr.ifr_name));
     if (ioctl(s, SIOCGIFMTU, &ifr) < 0) {
 	error("Can't get MTU for %s: %m", conn->ifName);
 	close(s);
@@ -213,6 +216,8 @@ PPPOEConnectDevice(void)
         discovery(conn);
 	if (conn->discoveryState != STATE_SESSION) {
 	    error("Unable to complete PPPoE Discovery");
+	    close(conn->discoverySocket);
+	    conn->discoverySocket = -1;
 	    return -1;
 	}
     }
@@ -316,26 +321,28 @@ PPPOEDisconnectDevice(void)
     memcpy(sp.sa_addr.pppoe.dev, conn->ifName, strlen(conn->ifName));
     memcpy(sp.sa_addr.pppoe.remote, conn->peerEth, ETH_ALEN);
     if (connect(conn->sessionSocket, (struct sockaddr *) &sp,
-		sizeof(struct sockaddr_pppox)) < 0) {
+		sizeof(struct sockaddr_pppox)) < 0 && errno != EALREADY) {
 	fatal("Failed to disconnect PPPoE socket: %d %m", errno);
 	return;
     }
     close(conn->sessionSocket);
-    close(conn->discoverySocket);
-    if (conn->ifName) {
-	free(conn->ifName);
+    if (conn->discoverySocket >= 0) {
+	sendPADT(conn, NULL);
+	close(conn->discoverySocket);
     }
-    free(conn);
+
+    /* Do NOT free conn; if pppd persist is on, we'll need it again */
 }
 
 static void
 PPPOEDeviceOptions(void)
 {
-    char buf[256];
-    snprintf(buf, 256, _PATH_ETHOPT "%s",devnam);
+    char buf[MAXPATHLEN];
+    strlcpy(buf, _PATH_ETHOPT, MAXPATHLEN);
+    strlcat(buf, devnam, MAXPATHLEN);
+
     if(!options_from_file(buf, 0, 0, 1))
 	exit(EXIT_OPTION_ERROR);
-
 }
 
 struct channel pppoe_channel;
@@ -343,7 +350,7 @@ struct channel pppoe_channel;
 /**********************************************************************
  * %FUNCTION: PPPoEDevnameHook
  * %ARGUMENTS:
- * cmd -- the command (actually, the device name
+ * cmd -- the command (actually, the device name)
  * argv -- argument vector
  * doit -- if non-zero, set device name.  Otherwise, just check if possible
  * %RETURNS:
@@ -370,7 +377,6 @@ PPPoEDevnameHook(char *cmd, char **argv,
        Patch based on suggestion from Mike Ireton.
     */
     if (seen_devnam[seen_idx]) {
-	if (OldDevnameHook) return OldDevnameHook(cmd, argv, doit);
 	return 0;
     }
 
@@ -382,7 +388,6 @@ PPPoEDevnameHook(char *cmd, char **argv,
     } else {
 	if (strncmp(cmd, "eth", 3) &&
 	    strncmp(cmd, "br", 2)) {
-	    if (OldDevnameHook) return OldDevnameHook(cmd, argv, doit);
 	    return 0;
 	}
     }
@@ -394,7 +399,7 @@ PPPoEDevnameHook(char *cmd, char **argv,
 
     /* Try getting interface index */
     if (r) {
-	strncpy(ifr.ifr_name, cmd, IFNAMSIZ);
+	strlcpy(ifr.ifr_name, cmd, IFNAMSIZ);
 	if (ioctl(fd, SIOCGIFINDEX, &ifr) < 0) {
 	    r = 0;
 	} else {
@@ -402,8 +407,9 @@ PPPoEDevnameHook(char *cmd, char **argv,
 		r = 0;
 	    } else {
 		if (ifr.ifr_hwaddr.sa_family != ARPHRD_ETHER) {
-		    error("Interface %s not Ethernet", cmd);
-		    r=0;
+		    if (doit)
+			error("Interface %s not Ethernet", cmd);
+		    r = 0;
 		}
 	    }
 	}
@@ -414,7 +420,7 @@ PPPoEDevnameHook(char *cmd, char **argv,
     if (r) {
 	seen_devnam[seen_idx] = 1;
 	if (doit) {
-	    strncpy(devnam, cmd, sizeof(devnam));
+	    strlcpy(devnam, cmd, sizeof(devnam));
 	    if (the_channel != &pppoe_channel) {
 
 		the_channel = &pppoe_channel;
@@ -445,7 +451,6 @@ PPPoEDevnameHook(char *cmd, char **argv,
 	return 1;
     }
 
-    if (OldDevnameHook) r = OldDevnameHook(cmd, argv, doit);
     return r;
 }
 
diff -pruN 3.12-1.2/src/ppp.c 3.15-1/src/ppp.c
--- 3.12-1.2/src/ppp.c	2015-11-11 15:10:04.000000000 +0000
+++ 3.15-1/src/ppp.c	2021-05-07 13:18:00.000000000 +0000
@@ -7,6 +7,7 @@
 * Functions for talking to PPP daemon
 *
 * Copyright (C) 2000-2012 by Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This program may be distributed according to the terms of the GNU
 * General Public License, version 2 or (at your option) any later version.
@@ -15,9 +16,6 @@
 *
 ***********************************************************************/
 
-static char const RCSID[] =
-"$Id$";
-
 #include "pppoe.h"
 
 #ifdef HAVE_SYSLOG_H
diff -pruN 3.12-1.2/src/pppoe.c 3.15-1/src/pppoe.c
--- 3.12-1.2/src/pppoe.c	2015-11-11 15:10:04.000000000 +0000
+++ 3.15-1/src/pppoe.c	2021-05-07 13:18:00.000000000 +0000
@@ -5,6 +5,7 @@
 * Implementation of user-space PPPoE redirector for Linux.
 *
 * Copyright (C) 2000-2015 by Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This program may be distributed according to the terms of the GNU
 * General Public License, version 2 or (at your option) any later version.
@@ -13,9 +14,7 @@
 *
 ***********************************************************************/
 
-static char const RCSID[] =
-"$Id$";
-
+#define _GNU_SOURCE 1
 #include "pppoe.h"
 
 #ifdef HAVE_SYSLOG_H
@@ -179,24 +178,29 @@ sessionDiscoveryPacket(PPPoEConnection *
 	return;
     }
 
-    if (packet.code != CODE_PADT) {
-	/* Not PADT; ignore it */
-	return;
-    }
-
-    /* It's a PADT, all right.  Is it for us? */
+    /* Is it for our session? */
     if (packet.session != conn->session) {
 	/* Nope, ignore it */
 	return;
     }
 
+    /* Is it for our Ethernet interface? */
     if (memcmp(packet.ethHdr.h_dest, conn->myEth, ETH_ALEN)) {
+	/* Nope, ignore it */
 	return;
     }
 
+    /* Is it from our peer's Ethernet interface? */
     if (memcmp(packet.ethHdr.h_source, conn->peerEth, ETH_ALEN)) {
+	/* Nope, ignore it */
 	return;
     }
+
+    if (packet.code != CODE_PADT) {
+	/* Not PADT; ignore it */
+	return;
+    }
+
 #ifdef DEBUGGING_ENABLED
     if (conn->debugFile) {
 	dumpPacket(conn->debugFile, &packet, "RCVD");
@@ -244,8 +248,7 @@ session(PPPoEConnection *conn)
     memcpy(packet.ethHdr.h_dest, conn->peerEth, ETH_ALEN);
     memcpy(packet.ethHdr.h_source, conn->myEth, ETH_ALEN);
     packet.ethHdr.h_proto = htons(Eth_PPPOE_Session);
-    packet.ver = 1;
-    packet.type = 1;
+    packet.vertype = PPPOE_VER_TYPE(1, 1);
     packet.code = CODE_SESS;
     packet.session = conn->session;
 
@@ -381,11 +384,12 @@ usage(char const *argv0)
 	    "   -d             -- Perform discovery, print session info and exit.\n"
 	    "   -f disc:sess   -- Set Ethernet frame types (hex).\n"
 	    "   -h             -- Print usage information.\n\n"
-	    "PPPoE Version %s, Copyright (C) 2001-2015 Roaring Penguin Software Inc.\n"
-	    "PPPoE comes with ABSOLUTELY NO WARRANTY.\n"
+	    "RP-PPPoE Version %s, Copyright (C) 2001-2018 Roaring Penguin Software Inc.\n"
+	    "                 %*s  Copyright (C) 2018-2021 Dianne Skoll\n"
+	    "RP-PPPoE comes with ABSOLUTELY NO WARRANTY.\n"
 	    "This is free software, and you are welcome to redistribute it under the terms\n"
 	    "of the GNU General Public License, version 2 or any later version.\n"
-	    "http://www.roaringpenguin.com\n", VERSION);
+	    "https://dianne.skoll.ca/projects/rp-pppoe/\n", RP_VERSION, (int) strlen(RP_VERSION), "");
     exit(EXIT_SUCCESS);
 }
 
@@ -553,7 +557,7 @@ main(int argc, char *argv[])
 			optarg, strerror(errno));
 		exit(EXIT_FAILURE);
 	    }
-	    fprintf(conn.debugFile, "rp-pppoe-%s\n", VERSION);
+	    fprintf(conn.debugFile, "rp-pppoe-%s\n", RP_VERSION);
 	    fflush(conn.debugFile);
 	    break;
 #endif
@@ -578,7 +582,7 @@ main(int argc, char *argv[])
 	    SET_STRING(conn.ifName, optarg);
 	    break;
 	case 'V':
-	    printf("Roaring Penguin PPPoE Version %s\n", VERSION);
+	    printf("RP-PPPoE Version %s\n", RP_VERSION);
 	    exit(EXIT_SUCCESS);
 	case 'A':
 	    conn.printACNames = 1;
@@ -669,10 +673,10 @@ main(int argc, char *argv[])
 	exit(EXIT_SUCCESS);
     }
 
-    /* Set signal handlers: send PADT on HUP; ignore TERM and INT */
-    signal(SIGTERM, SIG_IGN);
-    signal(SIGINT, SIG_IGN);
-    signal(SIGHUP, sigPADT);
+    /* Set signal handlers: send PADT on HUP, TERM and INT */
+    signal(SIGTERM, sigPADT);
+    signal(SIGINT,  sigPADT);
+    signal(SIGHUP,  sigPADT);
     session(&conn);
     return 0;
 }
@@ -795,12 +799,12 @@ asyncReadFromEth(PPPoEConnection *conn,
 	syslog(LOG_ERR, "Unexpected packet code %d", (int) packet.code);
 	return;
     }
-    if (packet.ver != 1) {
-	syslog(LOG_ERR, "Unexpected packet version %d", (int) packet.ver);
+    if (PPPOE_VER(packet.vertype) != 1) {
+	syslog(LOG_ERR, "Unexpected packet version %d", PPPOE_VER(packet.vertype));
 	return;
     }
-    if (packet.type != 1) {
-	syslog(LOG_ERR, "Unexpected packet type %d", (int) packet.type);
+    if (PPPOE_TYPE(packet.vertype) != 1) {
+	syslog(LOG_ERR, "Unexpected packet type %d", PPPOE_TYPE(packet.vertype));
 	return;
     }
     if (memcmp(packet.ethHdr.h_dest, conn->myEth, ETH_ALEN)) {
@@ -924,12 +928,12 @@ syncReadFromEth(PPPoEConnection *conn, i
 	syslog(LOG_ERR, "Unexpected packet code %d", (int) packet.code);
 	return;
     }
-    if (packet.ver != 1) {
-	syslog(LOG_ERR, "Unexpected packet version %d", (int) packet.ver);
+    if (PPPOE_VER(packet.vertype) != 1) {
+	syslog(LOG_ERR, "Unexpected packet version %d", PPPOE_VER(packet.vertype));
 	return;
     }
-    if (packet.type != 1) {
-	syslog(LOG_ERR, "Unexpected packet type %d", (int) packet.type);
+    if (PPPOE_TYPE(packet.vertype) != 1) {
+	syslog(LOG_ERR, "Unexpected packet type %d", PPPOE_TYPE(packet.vertype));
 	return;
     }
     if (memcmp(packet.ethHdr.h_dest, conn->myEth, ETH_ALEN)) {
diff -pruN 3.12-1.2/src/pppoe.h 3.15-1/src/pppoe.h
--- 3.12-1.2/src/pppoe.h	2015-11-11 15:10:04.000000000 +0000
+++ 3.15-1/src/pppoe.h	2021-05-07 13:18:00.000000000 +0000
@@ -5,6 +5,7 @@
 * Declaration of various PPPoE constants
 *
 * Copyright (C) 2000-2012 Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This program may be distributed according to the terms of the GNU
 * General Public License, version 2 or (at your option) any later version.
@@ -43,21 +44,10 @@ extern int IsSetID;
 #error Unknown method for accessing raw Ethernet frames
 #endif
 
-#ifdef HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
 
-/* Ugly header files on some Linux boxes... */
-#if defined(HAVE_LINUX_IF_H)
-#include <linux/if.h>
-#elif defined(HAVE_NET_IF_H)
-#include <net/if.h>
-#endif
-
 #ifdef HAVE_NET_IF_TYPES_H
 #include <net/if_types.h>
 #endif
@@ -226,19 +216,17 @@ extern void dropPrivs(void);
 /* A PPPoE Packet, including Ethernet headers */
 typedef struct PPPoEPacketStruct {
     struct ethhdr ethHdr;	/* Ethernet header */
-#ifdef PACK_BITFIELDS_REVERSED
-    unsigned int type:4;	/* PPPoE Type (must be 1) */
-    unsigned int ver:4;		/* PPPoE Version (must be 1) */
-#else
-    unsigned int ver:4;		/* PPPoE Version (must be 1) */
-    unsigned int type:4;	/* PPPoE Type (must be 1) */
-#endif
+    unsigned int vertype:8;	/* PPPoE Version (high nibble) and Type (low nibble) (must both be 1) */
     unsigned int code:8;	/* PPPoE code */
     unsigned int session:16;	/* PPPoE session */
     unsigned int length:16;	/* Payload length */
     unsigned char payload[ETH_JUMBO_LEN]; /* A bit of room to spare */
 } PPPoEPacket;
 
+#define PPPOE_VER(vt)	((vt) >> 4)
+#define PPPOE_TYPE(vt)	((vt) & 0xf)
+#define PPPOE_VER_TYPE(v, t)	(((v) << 4) | (t))
+
 /* Header size of a PPPoE packet */
 #define PPPOE_OVERHEAD 6  /* type, code, session, length */
 #define HDR_SIZE (sizeof(struct ethhdr) + PPPOE_OVERHEAD)
@@ -338,7 +326,6 @@ void syncReadFromPPP(PPPoEConnection *co
 void asyncReadFromPPP(PPPoEConnection *conn, PPPoEPacket *packet);
 void asyncReadFromEth(PPPoEConnection *conn, int sock, int clampMss);
 void syncReadFromEth(PPPoEConnection *conn, int sock, int clampMss);
-char *strDup(char const *str);
 void sendPADT(PPPoEConnection *conn, char const *msg);
 void sendPADTf(PPPoEConnection *conn, char const *fmt, ...);
 
@@ -352,7 +339,11 @@ void discovery(PPPoEConnection *conn);
 unsigned char *findTag(PPPoEPacket *packet, UINT16_t tagType,
 		       PPPoETag *tag);
 
-#define SET_STRING(var, val) do { if (var) free(var); var = strDup(val); } while(0);
+#ifndef HAVE_STRLCPY
+size_t strlcpy(char *dst, const char *src, size_t size);
+#endif
+
+#define SET_STRING(var, val) do { if (var) free(var); var = strdup(val); if (!var) rp_fatal("strdup failed"); } while(0);
 
 #define CHECK_ROOM(cursor, start, len) \
 do {\
diff -pruN 3.12-1.2/src/pppoe-server.c 3.15-1/src/pppoe-server.c
--- 3.12-1.2/src/pppoe-server.c	2015-11-11 15:10:04.000000000 +0000
+++ 3.15-1/src/pppoe-server.c	2021-05-07 13:18:00.000000000 +0000
@@ -5,6 +5,7 @@
 * Implementation of a user-space PPPoE server
 *
 * Copyright (C) 2000-2012 Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This program may be distributed according to the terms of the GNU
 * General Public License, version 2 or (at your option) any later version.
@@ -15,17 +16,19 @@
 *
 ***********************************************************************/
 
-static char const RCSID[] =
-"$Id$";
-
 #include "config.h"
 
+#include <sys/socket.h>
+#if defined(HAVE_LINUX_IF_H)
+#include <linux/if.h>
+#elif defined(HAVE_NET_IF_H)
+#include <net/if.h>
+#endif
+
 #if defined(HAVE_NETPACKET_PACKET_H) || defined(HAVE_LINUX_IF_PACKET_H)
 #define _POSIX_SOURCE 1 /* For sigaction defines */
 #endif
 
-#define _BSD_SOURCE 1 /* for gethostname */
-
 #include "pppoe-server.h"
 #include "md5.h"
 
@@ -142,6 +145,9 @@ static char *pppoptfile = NULL;
 static char *pppd_path = PPPD_PATH;
 static char *pppoe_path = PPPOE_PATH;
 
+static char *motd_string = NULL;
+static char *hurl_string = NULL;
+
 static int Debug = 0;
 static int CheckPoolSyntax = 0;
 
@@ -694,8 +700,7 @@ processPADI(Interface *ethif, PPPoEPacke
     memcpy(pado.ethHdr.h_dest, packet->ethHdr.h_source, ETH_ALEN);
     memcpy(pado.ethHdr.h_source, myAddr, ETH_ALEN);
     pado.ethHdr.h_proto = htons(Eth_PPPOE_Discovery);
-    pado.ver = 1;
-    pado.type = 1;
+    pado.vertype = PPPOE_VER_TYPE(1, 1);
     pado.code = CODE_PADO;
     pado.session = 0;
     plen = TAG_HDR_SIZE + acname_len;
@@ -850,6 +855,10 @@ processPADR(Interface *ethif, PPPoEPacke
     int slen = 0;
     char const *serviceName = NULL;
 
+    /* Temporary structure for sending PADM's. */
+    PPPoEConnection conn;
+
+
 #ifdef HAVE_LICENSE
     int freemem;
 #endif
@@ -1027,8 +1036,7 @@ processPADR(Interface *ethif, PPPoEPacke
     memcpy(pads.ethHdr.h_dest, packet->ethHdr.h_source, ETH_ALEN);
     memcpy(pads.ethHdr.h_source, myAddr, ETH_ALEN);
     pads.ethHdr.h_proto = htons(Eth_PPPOE_Discovery);
-    pads.ver = 1;
-    pads.type = 1;
+    pads.vertype = PPPOE_VER_TYPE(1, 1);
     pads.code = CODE_PADS;
 
     pads.session = cliSession->sess;
@@ -1082,6 +1090,19 @@ processPADR(Interface *ethif, PPPoEPacke
     pads.length = htons(plen);
     sendPacket(NULL, sock, &pads, (int) (plen + HDR_SIZE));
 
+    if (hurl_string || motd_string) {
+	memset(&conn, 0, sizeof(conn));
+	conn.hostUniq = NULL;
+
+	memcpy(conn.myEth, cliSession->ethif->mac, ETH_ALEN);
+	conn.discoverySocket = sock;
+	conn.session = cliSession->sess;
+	memcpy(conn.peerEth, cliSession->eth, ETH_ALEN);
+	if (hurl_string != NULL)
+	    sendHURLorMOTM(&conn, hurl_string, TAG_HURL);
+	if (motd_string != NULL)
+	    sendHURLorMOTM(&conn, motd_string, TAG_MOTM);
+    }
     /* Close sock; don't need it any more */
     close(sock);
 
@@ -1159,8 +1180,11 @@ usage(char const *argv0)
 #endif
 
     fprintf(stderr, "   -i             -- Ignore PADI if no free sessions.\n");
+    fprintf(stderr, "   -M msg         -- Send MSG in a MOTM tag in PADM packet after PADS.\n");
+    fprintf(stderr, "   -H url         -- Send URL in a HURL tag in PADM packet after PADS.\n");
     fprintf(stderr, "   -h             -- Print usage information.\n\n");
-    fprintf(stderr, "PPPoE-Server Version %s, Copyright (C) 2001-2009 Roaring Penguin Software Inc.\n", VERSION);
+    fprintf(stderr, "PPPoE-Server Version %s, Copyright (C) 2001-2009 Roaring Penguin Software Inc.\n", RP_VERSION);
+    fprintf(stderr, "                     %*s  Copyright (C) 2018-2021 Dianne Skoll\n", (int) strlen(RP_VERSION), "");
 
 #ifndef HAVE_LICENSE
     fprintf(stderr, "PPPoE-Server comes with ABSOLUTELY NO WARRANTY.\n");
@@ -1168,7 +1192,7 @@ usage(char const *argv0)
     fprintf(stderr, "under the terms of the GNU General Public License, version 2\n");
     fprintf(stderr, "or (at your option) any later version.\n");
 #endif
-    fprintf(stderr, "http://www.roaringpenguin.com\n");
+    fprintf(stderr, "https://dianne.skoll.ca/projects/rp-pppoe/\n");
 }
 
 /**********************************************************************
@@ -1200,9 +1224,9 @@ main(int argc, char **argv)
 #endif
 
 #ifndef HAVE_LINUX_KERNEL_PPPOE
-    char *options = "X:ix:hI:C:L:R:T:m:FN:f:O:o:sp:lrudPc:S:1q:Q:";
+    char *options = "X:ix:hI:C:L:R:T:m:FN:f:O:o:sp:lrudPc:S:1q:Q:H:M:";
 #else
-    char *options = "X:ix:hI:C:L:R:T:m:FN:f:O:o:skp:lrudPc:S:1q:Q:";
+    char *options = "X:ix:hI:C:L:R:T:m:FN:f:O:o:skp:lrudPc:S:1q:Q:H:M:";
 #endif
 
     if (getuid() != geteuid() ||
@@ -1270,6 +1294,29 @@ main(int argc, char **argv)
 	    }
 	    break;
 
+	case 'M':
+	    if (motd_string) {
+		free(motd_string);
+		motd_string = NULL;
+	    }
+	    motd_string = strdup(optarg);
+	    if (!motd_string) {
+		fprintf(stderr, "Out of memory");
+		exit(1);
+	    }
+	    break;
+
+	case 'H':
+	    if (hurl_string) {
+		free(hurl_string);
+		hurl_string = NULL;
+	    }
+	    hurl_string = strdup(optarg);
+	    if (!hurl_string) {
+		fprintf(stderr, "Out of memory");
+		exit(1);
+	    }
+	    break;
 	case 'c':
 #ifndef HAVE_LICENSE
 	    fprintf(stderr, "Clustering capability not available.\n");
@@ -1782,7 +1829,7 @@ serverProcessPacket(Interface *i)
     }
 
     /* Sanity check on packet */
-    if (packet.ver != 1 || packet.type != 1) {
+    if (PPPOE_VER(packet.vertype) != 1 || PPPOE_TYPE(packet.vertype) != 1) {
 	/* Syslog an error */
 	return;
     }
@@ -1847,8 +1894,7 @@ sendErrorPADS(int sock,
     memcpy(pads.ethHdr.h_dest, dest, ETH_ALEN);
     memcpy(pads.ethHdr.h_source, source, ETH_ALEN);
     pads.ethHdr.h_proto = htons(Eth_PPPOE_Discovery);
-    pads.ver = 1;
-    pads.type = 1;
+    pads.vertype = PPPOE_VER_TYPE(1, 1);
     pads.code = CODE_PADS;
 
     pads.session = htons(0);
@@ -1892,7 +1938,7 @@ startPPPDUserMode(ClientSession *session
     /* Leave some room */
     char *argv[64];
 
-    char buffer[SMALLBUF];
+    char buffer[2 * SMALLBUF];
 
     int c = 0;
 
@@ -1900,7 +1946,7 @@ startPPPDUserMode(ClientSession *session
     argv[c++] = "pty";
 
     /* Let's hope service-name does not have ' in it... */
-    snprintf(buffer, SMALLBUF, "%s -n -I %s -e %u:%02x:%02x:%02x:%02x:%02x:%02x%s -S '%s'",
+    snprintf(buffer, sizeof(buffer), "%s -n -I %s -e %u:%02x:%02x:%02x:%02x:%02x:%02x%s -S '%s'",
 	     pppoe_path, session->ethif->name,
 	     (unsigned int) ntohs(session->sess),
 	     session->eth[0], session->eth[1], session->eth[2],
@@ -1915,7 +1961,7 @@ startPPPDUserMode(ClientSession *session
     argv[c++] = "file";
     argv[c++] = pppoptfile;
 
-    snprintf(buffer, SMALLBUF, "%d.%d.%d.%d:%d.%d.%d.%d",
+    snprintf(buffer, sizeof(buffer), "%d.%d.%d.%d:%d.%d.%d.%d",
 	    (int) session->myip[0], (int) session->myip[1],
 	    (int) session->myip[2], (int) session->myip[3],
 	    (int) session->peerip[0], (int) session->peerip[1],
@@ -2309,8 +2355,8 @@ sendHURLorMOTM(PPPoEConnection *conn, ch
     if (conn->discoverySocket < 0) return;
 
     if (tag == TAG_HURL) {
-	if (strncmp(url, "http://", 7)) {
-	    syslog(LOG_WARNING, "sendHURL(%s): URL must begin with http://", url);
+	if (strncmp(url, "http://", 7) && strncmp(url, "https://", 8)) {
+	    syslog(LOG_WARNING, "sendHURL(%s): URL must begin with http:// or https://", url);
 	    return;
 	}
     } else {
@@ -2321,8 +2367,7 @@ sendHURLorMOTM(PPPoEConnection *conn, ch
     memcpy(packet.ethHdr.h_source, conn->myEth, ETH_ALEN);
 
     packet.ethHdr.h_proto = htons(Eth_PPPOE_Discovery);
-    packet.ver = 1;
-    packet.type = 1;
+    packet.vertype = PPPOE_VER_TYPE(1, 1);
     packet.code = CODE_PADM;
     packet.session = conn->session;
 
diff -pruN 3.12-1.2/src/pppoe-server.h 3.15-1/src/pppoe-server.h
--- 3.12-1.2/src/pppoe-server.h	2015-11-11 15:10:04.000000000 +0000
+++ 3.15-1/src/pppoe-server.h	2021-05-07 13:18:00.000000000 +0000
@@ -5,6 +5,7 @@
 * Definitions for PPPoE server
 *
 * Copyright (C) 2001-2012 Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This program may be distributed according to the terms of the GNU
 * General Public License, version 2 or (at your option) any later version.
diff -pruN 3.12-1.2/src/pppoe-sniff.c 3.15-1/src/pppoe-sniff.c
--- 3.12-1.2/src/pppoe-sniff.c	2015-11-11 15:10:04.000000000 +0000
+++ 3.15-1/src/pppoe-sniff.c	2021-05-07 13:18:00.000000000 +0000
@@ -5,7 +5,8 @@
 * Sniff a network for likely-looking PPPoE frames and deduce the value
 * to supply to PPPOE_EXTRA in /etc/ppp/pppoe.conf.  USE AT YOUR OWN RISK.
 *
-* Copyright (C) 2000 by Roaring Penguin Software Inc.
+* Copyright (C) 2000-2018 by Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This program may be distributed according to the terms of the GNU
 * General Public License, version 2 or (at your option) any later version.
@@ -14,9 +15,7 @@
 *
 ***********************************************************************/
 
-static char const RCSID[] =
-"$Id$";
-
+#define _GNU_SOURCE 1
 #include "pppoe.h"
 
 #ifdef HAVE_GETOPT_H
@@ -124,11 +123,12 @@ usage(char const *argv0)
     fprintf(stderr, "   -I if_name     -- Specify interface (default %s.)\n",
 	    DEFAULT_IF);
     fprintf(stderr, "   -V             -- Print version and exit.\n");
-    fprintf(stderr, "\nPPPoE Version %s, Copyright (C) 2000 Roaring Penguin Software Inc.\n", VERSION);
+    fprintf(stderr, "\nPPPoE Version %s, Copyright (C) 2000 Roaring Penguin Software Inc.\n", RP_VERSION);
+    fprintf(stderr, "              %*s  Copyright (C) 2018-2021 Dianne Skoll\n", (int) strlen(RP_VERSION), "");
     fprintf(stderr, "PPPoE comes with ABSOLUTELY NO WARRANTY.\n");
     fprintf(stderr, "This is free software, and you are welcome to redistribute it under the terms\n");
     fprintf(stderr, "of the GNU General Public License, version 2 or any later version.\n");
-    fprintf(stderr, "http://www.roaringpenguin.com\n");
+    fprintf(stderr, "https://dianne.skoll.ca/projects/rp-pppoe/\n");
     exit(0);
 }
 
@@ -175,7 +175,7 @@ main(int argc, char *argv[])
 	    SET_STRING(IfName, optarg);
 	    break;
 	case 'V':
-	    printf("pppoe-sniff: Roaring Penguin PPPoE Version %s\n", VERSION);
+	    printf("pppoe-sniff: RP-PPPoE Version %s\n", RP_VERSION);
 	    exit(0);
 	default:
 	    usage(argv[0]);
@@ -200,13 +200,13 @@ main(int argc, char *argv[])
 
 #endif
 
-    /* We assume interface is in promiscuous mode -- use ifconfig to
-       ensure this */
+    /* We assume interface is in promiscuous mode -- use "ip link
+       show" to ensure this */
     fprintf(stderr, "Sniffing for PADR.  Start your connection on another machine...\n");
     while (!SeenPADR) {
 	if (receivePacket(sock, &pkt, &size) < 0) continue;
 	if (ntohs(pkt.length) + HDR_SIZE > size) continue;
-	if (pkt.ver != 1 || pkt.type != 1)       continue;
+	if (PPPOE_VER(pkt.vertype) != 1 || PPPOE_TYPE(pkt.vertype) != 1) continue;
 	if (pkt.code != CODE_PADR)               continue;
 
 	/* Looks promising... parse it */
@@ -221,7 +221,7 @@ main(int argc, char *argv[])
     while (!SeenSess) {
 	if (receivePacket(sock, &pkt, &size) < 0) continue;
 	if (ntohs(pkt.length) + HDR_SIZE > size) continue;
-	if (pkt.ver != 1 || pkt.type != 1)       continue;
+	if (PPPOE_VER(pkt.vertype) != 1 || PPPOE_TYPE(pkt.vertype) != 1) continue;
 	if (pkt.code != CODE_SESS)               continue;
 
 	/* Cool! */
diff -pruN 3.12-1.2/src/relay.c 3.15-1/src/relay.c
--- 3.12-1.2/src/relay.c	2015-11-11 15:10:04.000000000 +0000
+++ 3.15-1/src/relay.c	2021-05-07 13:18:00.000000000 +0000
@@ -4,7 +4,8 @@
 *
 * Implementation of PPPoE relay
 *
-* Copyright (C) 2001-2006 Roaring Penguin Software Inc.
+* Copyright (C) 2001-2018 Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This program may be distributed according to the terms of the GNU
 * General Public License, version 2 or (at your option) any later version.
@@ -14,14 +15,17 @@
 * $Id$
 *
 ***********************************************************************/
-static char const RCSID[] =
-"$Id$";
-
 #define _GNU_SOURCE 1 /* For SA_RESTART */
+#include "config.h"
 
-#include "relay.h"
-
+#include <sys/socket.h>
+#if defined(HAVE_LINUX_IF_H)
+#include <linux/if.h>
+#elif defined(HAVE_NET_IF_H)
+#include <net/if.h>
+#endif
 #include <signal.h>
+#include "relay.h"
 
 #ifdef HAVE_SYSLOG_H
 #include <syslog.h>
@@ -208,11 +212,12 @@ usage(char const *argv0)
     fprintf(stderr, "   -F             -- Do not fork into background\n");
     fprintf(stderr, "   -h             -- Print this help message\n");
 
-    fprintf(stderr, "\nPPPoE Version %s, Copyright (C) 2001-2006 Roaring Penguin Software Inc.\n", VERSION);
+    fprintf(stderr, "\nPPPoE Version %s, Copyright (C) 2001-2006 Roaring Penguin Software Inc.\n", RP_VERSION);
+    fprintf(stderr, "              %*s  Copyright (C) 2018-2021 Dianne Skoll\n", (int) strlen(RP_VERSION), "");
     fprintf(stderr, "PPPoE comes with ABSOLUTELY NO WARRANTY.\n");
     fprintf(stderr, "This is free software, and you are welcome to redistribute it under the terms\n");
     fprintf(stderr, "of the GNU General Public License, version 2 or any later version.\n");
-    fprintf(stderr, "http://www.roaringpenguin.com\n");
+    fprintf(stderr, "https://dianne.skoll.ca/projects/rp-pppoe/\n");
     exit(EXIT_SUCCESS);
 }
 
@@ -823,7 +828,7 @@ relayGotDiscoveryPacket(PPPoEInterface c
 	return;
     }
     /* Ignore unknown code/version */
-    if (packet.ver != 1 || packet.type != 1) {
+    if (PPPOE_VER(packet.vertype) != 1 || PPPOE_TYPE(packet.vertype) != 1) {
 	return;
     }
 
@@ -883,7 +888,7 @@ relayGotSessionPacket(PPPoEInterface con
     }
 
     /* Ignore unknown code/version */
-    if (packet.ver != 1 || packet.type != 1) {
+    if (PPPOE_VER(packet.vertype) != 1 || PPPOE_TYPE(packet.vertype) != 1) {
 	return;
     }
 
@@ -1106,10 +1111,10 @@ relayHandlePADO(PPPoEInterface const *if
 
     acIndex = iface - Interfaces;
 
-    /* Source address must be unicast */
-    if (NOT_UNICAST(packet->ethHdr.h_source)) {
+    /* Source address can't be broadcast */
+    if (BROADCAST(packet->ethHdr.h_source)) {
 	syslog(LOG_ERR,
-	       "PADO packet from %02x:%02x:%02x:%02x:%02x:%02x on interface %s not from a unicast address",
+	       "PADO packet from %02x:%02x:%02x:%02x:%02x:%02x on interface %s from a broadcast address",
 	       packet->ethHdr.h_source[0],
 	       packet->ethHdr.h_source[1],
 	       packet->ethHdr.h_source[2],
@@ -1488,8 +1493,7 @@ relaySendError(unsigned char code,
     memcpy(packet.ethHdr.h_source, iface->mac, ETH_ALEN);
     memcpy(packet.ethHdr.h_dest, mac, ETH_ALEN);
     packet.ethHdr.h_proto = htons(Eth_PPPOE_Discovery);
-    packet.type = 1;
-    packet.ver = 1;
+    packet.vertype = PPPOE_VER_TYPE(1, 1);
     packet.code = code;
     packet.session = session;
     packet.length = htons(0);
diff -pruN 3.12-1.2/src/relay.h 3.15-1/src/relay.h
--- 3.12-1.2/src/relay.h	2015-11-11 15:10:04.000000000 +0000
+++ 3.15-1/src/relay.h	2021-05-07 13:18:00.000000000 +0000
@@ -5,6 +5,7 @@
 * Definitions for PPPoE relay
 *
 * Copyright (C) 2001-2006 Roaring Penguin Software Inc.
+* Copyright (C) 2018-2021 Dianne Skoll
 *
 * This program may be distributed according to the terms of the GNU
 * General Public License, version 2 or (at your option) any later version.
