1From e1b93db6a13d955c6bab6358a7fa27fecb59479f Mon Sep 17 00:00:00 2001 2From: Khem Raj <raj.khem@gmail.com> 3Date: Thu, 11 May 2023 17:24:46 -0700 4Subject: [PATCH] ippool: Port to ppp 2.5 APIs 5 6Upstream-Status: Pending 7Signed-off-by: Khem Raj <raj.khem@gmail.com> 8--- 9 pppd/ippool.c | 10 +++++----- 10 1 file changed, 5 insertions(+), 5 deletions(-) 11 12diff --git a/pppd/ippool.c b/pppd/ippool.c 13index 88cb901..d4b5c97 100644 14--- a/pppd/ippool.c 15+++ b/pppd/ippool.c 16@@ -6,7 +6,7 @@ 17 #include <stdlib.h> 18 #include <errno.h> 19 #include "pppd.h" 20-#include "pathnames.h" 21+#include "options.h" 22 #include "fsm.h" /* Needed for lcp.h to include cleanly */ 23 #include "lcp.h" 24 #include "ccp.h" 25@@ -23,7 +23,7 @@ 26 27 #include "ippool_rpc.h" 28 29-const char pppd_version[] = VERSION; 30+const char pppd_version[] = PPPD_VERSION; 31 32 static char *ippool_pool_name = NULL; 33 static char *ippool_pool_name2 = NULL; 34@@ -205,13 +205,13 @@ void plugin_init(void) 35 { 36 #if defined(__linux__) 37 extern int new_style_driver; /* From sys-linux.c */ 38- if (!ppp_available() && !new_style_driver) 39+ if (!ppp_check_kernel_support() && !new_style_driver) 40 fatal("Kernel doesn't support ppp_generic - " 41 "needed for Ippool"); 42 #else 43 fatal("No IP pool support on this OS"); 44 #endif 45- add_options(ippool_options); 46+ ppp_add_options(ippool_options); 47 48 memset(&ippool_addr, 0, sizeof(ippool_addr)); 49 50@@ -219,6 +219,6 @@ void plugin_init(void) 51 ip_down_hook = ippool_release_ip; 52 53 /* brute force, just in case ip_down_hook doesn't get called */ 54- add_notifier(&exitnotify, ippool_cleanup, 0); 55+ ppp_add_notify(NF_EXIT, ippool_cleanup, 0); 56 } 57 58-- 592.40.1 60 61