| 1 |
Linux kernel log: |
| 2 |
|
| 3 |
[ 29.812929] pppd uses obsolete (PF_INET,SOCK_PACKET) |
| 4 |
|
| 5 |
It's caused by missing the definition of HAVE_STRUCT_SOCKADDR_LL |
| 6 |
|
| 7 |
ref: https://github.com/ppp-project/ppp/blob/c42bade9f55544e30ec9d369c557742d36b7881e/pppd/plugins/pppoe/if.c#L116 |
| 8 |
|
| 9 |
- Add struct sockaddr_ll checks based on the original rp-pppoe code |
| 10 |
|
| 11 |
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. |
| 12 |
|
| 13 |
sll_family is picked arbitrarily, just make sure struct sockaddr_ll is working. |
| 14 |
|
| 15 |
- 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. |
| 16 |
|
| 17 |
--- a/configure.ac |
| 18 |
+++ b/configure.ac |
| 19 |
@@ -11,7 +11,7 @@ |
| 20 |
|
| 21 |
AC_LANG(C) |
| 22 |
AC_CONFIG_SRCDIR([pppd/main.c]) |
| 23 |
-AC_CONFIG_HEADERS([pppd/config.h pppd/pppdconf.h pppd/plugins/pppoe/config.h]) |
| 24 |
+AC_CONFIG_HEADERS([pppd/config.h pppd/pppdconf.h]) |
| 25 |
AC_ENABLE_STATIC(no) |
| 26 |
|
| 27 |
# Checks for programs. |
| 28 |
@@ -87,6 +87,13 @@ |
| 29 |
]) |
| 30 |
|
| 31 |
|
| 32 |
+# Check for struct sockaddr_ll for linux, required by pppoe plugin aka the original rp pppoe plugin |
| 33 |
+AC_CHECK_MEMBER([struct sockaddr_ll.sll_family], [AC_DEFINE([HAVE_STRUCT_SOCKADDR_LL], [1], [Linux kernel provides struct sockaddr_ll])], ,[ |
| 34 |
+#include <asm/types.h> |
| 35 |
+#include <linux/if_packet.h> |
| 36 |
+#include <linux/if_ether.h> |
| 37 |
+]) |
| 38 |
+ |
| 39 |
AC_CHECK_SIZEOF(unsigned int) |
| 40 |
AC_CHECK_SIZEOF(unsigned long) |
| 41 |
AC_CHECK_SIZEOF(unsigned short) |