diff options
Diffstat (limited to 'accel-pppd/ppp')
-rw-r--r-- | accel-pppd/ppp/ccp_mppe.c | 1 | ||||
-rw-r--r-- | accel-pppd/ppp/ipcp_opt_ipaddr.c | 6 | ||||
-rw-r--r-- | accel-pppd/ppp/ppp.c | 1 | ||||
-rw-r--r-- | accel-pppd/ppp/ppp.h | 5 | ||||
-rw-r--r-- | accel-pppd/ppp/ppp_ccp.c | 1 |
5 files changed, 8 insertions, 6 deletions
diff --git a/accel-pppd/ppp/ccp_mppe.c b/accel-pppd/ppp/ccp_mppe.c index ba86ef47..7d9aab21 100644 --- a/accel-pppd/ppp/ccp_mppe.c +++ b/accel-pppd/ppp/ccp_mppe.c @@ -1,6 +1,7 @@ #include <stdlib.h> #include <string.h> #include <errno.h> +#include <arpa/inet.h> #include <sys/socket.h> #include <sys/ioctl.h> #include "linux_ppp.h" diff --git a/accel-pppd/ppp/ipcp_opt_ipaddr.c b/accel-pppd/ppp/ipcp_opt_ipaddr.c index d584fd7f..217a0806 100644 --- a/accel-pppd/ppp/ipcp_opt_ipaddr.c +++ b/accel-pppd/ppp/ipcp_opt_ipaddr.c @@ -30,7 +30,7 @@ static void ipaddr_print(void (*print)(const char *fmt,...),struct ipcp_option_t struct ipaddr_option_t { struct ipcp_option_t opt; - struct ipdb_item_t *ip; + struct ipv4db_item_t *ip; int started:1; }; @@ -59,7 +59,7 @@ static void ipaddr_free(struct ppp_ipcp_t *ipcp, struct ipcp_option_t *opt) struct ipaddr_option_t *ipaddr_opt=container_of(opt,typeof(*ipaddr_opt),opt); if (ipaddr_opt->ip) - ipdb_put(ipcp->ppp, ipaddr_opt->ip); + ipdb_put_ipv4(ipcp->ppp, ipaddr_opt->ip); _free(ipaddr_opt); } @@ -88,7 +88,7 @@ static int ipaddr_send_conf_req(struct ppp_ipcp_t *ipcp, struct ipcp_option_t *o struct ipcp_opt32_t *opt32=(struct ipcp_opt32_t*)ptr; if (!ipaddr_opt->ip) { - ipaddr_opt->ip = ipdb_get(ipcp->ppp); + ipaddr_opt->ip = ipdb_get_ipv4(ipcp->ppp); if (!ipaddr_opt->ip) { log_ppp_warn("ppp:ipcp: no free IP address\n"); return -1; diff --git a/accel-pppd/ppp/ppp.c b/accel-pppd/ppp/ppp.c index 5c529489..b541ba50 100644 --- a/accel-pppd/ppp/ppp.c +++ b/accel-pppd/ppp/ppp.c @@ -494,6 +494,7 @@ static int get_layer_order(const char *name) if (!strcmp(name,"auth")) return 1; if (!strcmp(name,"ccp")) return 2; if (!strcmp(name,"ipcp")) return 2; + if (!strcmp(name,"ipv6cp")) return 2; return -1; } diff --git a/accel-pppd/ppp/ppp.h b/accel-pppd/ppp/ppp.h index c0ebe834..ae2a7c99 100644 --- a/accel-pppd/ppp/ppp.h +++ b/accel-pppd/ppp/ppp.h @@ -3,7 +3,6 @@ #include <sys/types.h> #include <time.h> -#include <netinet/in.h> #include <pthread.h> #include "triton.h" @@ -99,8 +98,8 @@ struct ppp_t time_t start_time; time_t stop_time; char *username; - in_addr_t ipaddr; - in_addr_t peer_ipaddr; + uint32_t ipaddr; + uint32_t peer_ipaddr; struct ppp_ctrl_t *ctrl; diff --git a/accel-pppd/ppp/ppp_ccp.c b/accel-pppd/ppp/ppp_ccp.c index c277f9f9..79b0c32d 100644 --- a/accel-pppd/ppp/ppp_ccp.c +++ b/accel-pppd/ppp/ppp_ccp.c @@ -1,6 +1,7 @@ #include <stdlib.h> #include <string.h> #include <errno.h> +#include <arpa/inet.h> #include <sys/socket.h> #include <sys/ioctl.h> #include "linux_ppp.h" |