Linux kernel log:

[   29.812929] pppd uses obsolete (PF_INET,SOCK_PACKET)

It's caused by missing the definition of HAVE_STRUCT_SOCKADDR_LL

ref: https://github.com/ppp-project/ppp/blob/c42bade9f55544e30ec9d369c557742d36b7881e/pppd/plugins/pppoe/if.c#L116

- Add struct sockaddr_ll checks based on the original rp-pppoe code

The struct is defined in kernel header include/uapi/linux/if_packet.h based on https://elixir.bootlin.com/linux/latest/A/ident/sockaddr_ll, thus we should check the header file as well.

sll_family is picked arbitrarily, just make sure struct sockaddr_ll is working.

- remove pppd/plugins/pppoe/config.h from AC_CONFIG_HEADERS, and use pppd/config.h directly, I cannot generate corrent config.h with HAVE_STRUCT_SOCKADDR_LL defined.

--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,7 @@
 
 AC_LANG(C)
 AC_CONFIG_SRCDIR([pppd/main.c])
-AC_CONFIG_HEADERS([pppd/config.h pppd/pppdconf.h pppd/plugins/pppoe/config.h])
+AC_CONFIG_HEADERS([pppd/config.h pppd/pppdconf.h])
 AC_ENABLE_STATIC(no)
 
 # Checks for programs.
@@ -87,6 +87,13 @@
 ])
 
 
+# Check for struct sockaddr_ll for linux, required by pppoe plugin aka the original rp pppoe plugin
+AC_CHECK_MEMBER([struct sockaddr_ll.sll_family], [AC_DEFINE([HAVE_STRUCT_SOCKADDR_LL], [1], [Linux kernel provides struct sockaddr_ll])], ,[
+#include <asm/types.h>
+#include <linux/if_packet.h>
+#include <linux/if_ether.h>
+])
+
 AC_CHECK_SIZEOF(unsigned int)
 AC_CHECK_SIZEOF(unsigned long)
 AC_CHECK_SIZEOF(unsigned short)
