From b2c36e6c0e1655aea9b1b0a03a8160f42a26c884 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pali=20Roh=C3=A1r?= Date: Thu, 31 Dec 2020 18:46:01 +0100 Subject: [PATCH] Rename rp-pppoe.so plugin to pppoe.so MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Original out-of-tree rp-pppoe plugin for pppd software is still available at website https://dianne.skoll.ca/projects/rp-pppoe/ and receives new releases. The last update is from the June 2020. Currently it is ambiguous if user is using original out-of-tree rp-pppoe plugin or in-tree pppd's rp-pppoe plugin. These two plugins are different, come from different sources but share same name. Some users want to use original rp-pppoe plugin and not pppd's in-tree rp-pppoe plugin. Also some distribution want to package both plugins, pppd's in-tree and original rp-pppoe. So for this reason and also because all other PPP over plugins have just pppo prefix, rename in-tree rp-pppoe.so plugin to just pppoe.so. This will allow to distinguish and make it clear what is the original rp-pppoe plugin and what is pppd's in-tree pppoe plugin. When installing pppd create a compatibility symlink from pppoe.so to rp-pppoe.so so nothing would be broken. This compatibility symlink may be removed by Linux distribution which do not want to have compatibility with the old name as before and rather use rp-pppoe.so name for original rp-pppoe software. Signed-off-by: Pali Rohár --- README.pppoe | 2 +- configure | 2 +- pppd/plugins/Makefile.linux | 2 +- pppd/plugins/{rp-pppoe => pppoe}/.gitignore | 0 pppd/plugins/{rp-pppoe => pppoe}/Makefile.linux | 16 ++++++++-------- pppd/plugins/{rp-pppoe => pppoe}/common.c | 0 pppd/plugins/{rp-pppoe => pppoe}/config.h | 0 pppd/plugins/{rp-pppoe => pppoe}/debug.c | 0 pppd/plugins/{rp-pppoe => pppoe}/discovery.c | 0 pppd/plugins/{rp-pppoe => pppoe}/if.c | 0 pppd/plugins/{rp-pppoe => pppoe}/plugin.c | 3 +-- .../{rp-pppoe => pppoe}/pppoe-discovery.c | 4 ++-- pppd/plugins/{rp-pppoe => pppoe}/pppoe.h | 0 pppd/pppd.8 | 2 +- 14 files changed, 15 insertions(+), 16 deletions(-) rename pppd/plugins/{rp-pppoe => pppoe}/.gitignore (100%) rename pppd/plugins/{rp-pppoe => pppoe}/Makefile.linux (82%) rename pppd/plugins/{rp-pppoe => pppoe}/common.c (100%) rename pppd/plugins/{rp-pppoe => pppoe}/config.h (100%) rename pppd/plugins/{rp-pppoe => pppoe}/debug.c (100%) rename pppd/plugins/{rp-pppoe => pppoe}/discovery.c (100%) rename pppd/plugins/{rp-pppoe => pppoe}/if.c (100%) rename pppd/plugins/{rp-pppoe => pppoe}/plugin.c (99%) rename pppd/plugins/{rp-pppoe => pppoe}/pppoe-discovery.c (99%) rename pppd/plugins/{rp-pppoe => pppoe}/pppoe.h (100%) diff --git a/README.pppoe b/README.pppoe index 9f4e5cd..2909e13 100644 --- a/README.pppoe +++ b/README.pppoe @@ -52,7 +52,7 @@ to connect to their ISP who is providing PPPoE based services. 4. Add the following line to /etc/ppp/options: - plugin rp-pppoe.so + plugin pppoe.so The effect of this line is simply to make "eth0", "eth1", ....,"ethx" all valid device names for pppd (just like ttyS0, diff --git a/configure b/configure index 6a55e0f..ecd1b0d 100755 --- a/configure +++ b/configure @@ -193,7 +193,7 @@ if [ -d "$ksrc" ]; then echo "Creating Makefiles." mkmkf $ksrc/Makefile.top Makefile mkmkf $ksrc/Makedefs$compiletype Makedefs.com - for dir in pppd pppstats chat pppdump pppd/plugins pppd/plugins/rp-pppoe \ + for dir in pppd pppstats chat pppdump pppd/plugins pppd/plugins/pppoe \ pppd/plugins/radius pppd/plugins/pppoatm \ pppd/plugins/pppol2tp; do mkmkf $dir/Makefile.$makext $dir/Makefile diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux index 5a7bd79..e2a680e 100644 --- a/pppd/plugins/Makefile.linux +++ b/pppd/plugins/Makefile.linux @@ -12,7 +12,7 @@ BINDIR = $(DESTDIR)/sbin MANDIR = $(DESTDIR)/share/man/man8 LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION) -SUBDIRS := rp-pppoe pppoatm pppol2tp +SUBDIRS := pppoe pppoatm pppol2tp # Uncomment the next line to include the radius authentication plugin SUBDIRS += radius PLUGINS := minconn.so passprompt.so passwordfd.so winbind.so diff --git a/pppd/plugins/rp-pppoe/.gitignore b/pppd/plugins/pppoe/.gitignore similarity index 100% rename from pppd/plugins/rp-pppoe/.gitignore rename to pppd/plugins/pppoe/.gitignore diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/pppoe/Makefile.linux similarity index 82% rename from pppd/plugins/rp-pppoe/Makefile.linux rename to pppd/plugins/pppoe/Makefile.linux index 2c93f4a..473f269 100644 --- a/pppd/plugins/rp-pppoe/Makefile.linux +++ b/pppd/plugins/pppoe/Makefile.linux @@ -21,13 +21,11 @@ LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION) PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h) INSTALL = install - -# Version is set ONLY IN THE MAKEFILE! Don't delete this! -RP_VERSION=3.8p +LN_S = ln -sf COPTS=-O2 -g -CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"' -all: rp-pppoe.so pppoe-discovery +CFLAGS=$(COPTS) -I../../../include +all: pppoe.so pppoe-discovery pppoe-discovery: pppoe-discovery.o debug.o $(CC) $(LDFLAGS) -o pppoe-discovery pppoe-discovery.o debug.o @@ -38,12 +36,14 @@ pppoe-discovery.o: pppoe-discovery.c debug.o: debug.c $(CC) $(CFLAGS) -I../../.. -c -o debug.o debug.c -rp-pppoe.so: plugin.o discovery.o if.o common.o - $(CC) $(LDFLAGS) -o rp-pppoe.so -shared plugin.o discovery.o if.o common.o +pppoe.so: plugin.o discovery.o if.o common.o + $(CC) $(LDFLAGS) -o pppoe.so -shared plugin.o discovery.o if.o common.o install: all $(INSTALL) -d -m 755 $(LIBDIR) - $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR) + $(INSTALL) -c -m 4550 pppoe.so $(LIBDIR) + # Symlink for backward compatibility + $(LN_S) pppoe.so $(LIBDIR)/rp-pppoe.so $(INSTALL) -d -m 755 $(BINDIR) $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR) diff --git a/pppd/plugins/rp-pppoe/common.c b/pppd/plugins/pppoe/common.c similarity index 100% rename from pppd/plugins/rp-pppoe/common.c rename to pppd/plugins/pppoe/common.c diff --git a/pppd/plugins/rp-pppoe/config.h b/pppd/plugins/pppoe/config.h similarity index 100% rename from pppd/plugins/rp-pppoe/config.h rename to pppd/plugins/pppoe/config.h diff --git a/pppd/plugins/rp-pppoe/debug.c b/pppd/plugins/pppoe/debug.c similarity index 100% rename from pppd/plugins/rp-pppoe/debug.c rename to pppd/plugins/pppoe/debug.c diff --git a/pppd/plugins/rp-pppoe/discovery.c b/pppd/plugins/pppoe/discovery.c similarity index 100% rename from pppd/plugins/rp-pppoe/discovery.c rename to pppd/plugins/pppoe/discovery.c diff --git a/pppd/plugins/rp-pppoe/if.c b/pppd/plugins/pppoe/if.c similarity index 100% rename from pppd/plugins/rp-pppoe/if.c rename to pppd/plugins/pppoe/if.c diff --git a/pppd/plugins/rp-pppoe/plugin.c b/pppd/plugins/pppoe/plugin.c similarity index 99% rename from pppd/plugins/rp-pppoe/plugin.c rename to pppd/plugins/pppoe/plugin.c index 93c0906..e840bef 100644 --- a/pppd/plugins/rp-pppoe/plugin.c +++ b/pppd/plugins/pppoe/plugin.c @@ -399,8 +399,7 @@ plugin_init(void) add_options(Options); - info("RP-PPPoE plugin version %s compiled against pppd %s", - RP_VERSION, VERSION); + info("PPPoE plugin from pppd %s", VERSION); } void pppoe_check_options(void) diff --git a/pppd/plugins/rp-pppoe/pppoe-discovery.c b/pppd/plugins/pppoe/pppoe-discovery.c similarity index 99% rename from pppd/plugins/rp-pppoe/pppoe-discovery.c rename to pppd/plugins/pppoe/pppoe-discovery.c index c970337..34b77e8 100644 --- a/pppd/plugins/rp-pppoe/pppoe-discovery.c +++ b/pppd/plugins/pppoe/pppoe-discovery.c @@ -713,7 +713,7 @@ int main(int argc, char *argv[]) optarg, strerror(errno)); exit(1); } - fprintf(conn->debugFile, "pppoe-discovery %s\n", RP_VERSION); + fprintf(conn->debugFile, "pppoe-discovery from pppd %s\n", VERSION); break; case 'I': conn->ifName = xstrdup(optarg); @@ -787,5 +787,5 @@ void usage(void) " -U -- Use Host-Unique to allow multiple PPPoE sessions.\n" " -W hexvalue -- Set the Host-Unique to the supplied hex string.\n" " -h -- Print usage information.\n"); - fprintf(stderr, "\nVersion " RP_VERSION "\n"); + fprintf(stderr, "\npppoe-discovery from pppd " VERSION "\n"); } diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/pppoe/pppoe.h similarity index 100% rename from pppd/plugins/rp-pppoe/pppoe.h rename to pppd/plugins/pppoe/pppoe.h diff --git a/pppd/pppd.8 b/pppd/pppd.8 index 85af954..6a11fcb 100644 --- a/pppd/pppd.8 +++ b/pppd/pppd.8 @@ -1204,7 +1204,7 @@ Use software flow control (i.e. XON/XOFF) to control the flow of data on the serial port. .SH PPPOE OPTIONS To establish PPP link over Ethernet (PPPoE) it is needed to load pppd's -\fBplugin rp-pppoe.so\fR and then specify option \fBnic-\fIinterface\fR +\fBplugin pppoe.so\fR and then specify option \fBnic-\fIinterface\fR instead of modem options \fIttyname\fR and \fIspeed\fR. Recognized pppd's PPPoE options are: .TP -- 2.39.2