diff options
author | sjg <sjg@FreeBSD.org> | 2015-05-27 01:19:58 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2015-05-27 01:19:58 +0000 |
commit | 65145fa4c81da358fcbc3b650156dab705dfa34e (patch) | |
tree | 55c065b6730aaac2afb6c29933ee6ec5fa4c4249 /usr.sbin/ppp | |
parent | 60ff4eb0dff94a04d75d0d52a3957aaaf5f8c693 (diff) | |
parent | e6b664c390af88d4a87208bc042ce503da664c3b (diff) | |
download | FreeBSD-src-65145fa4c81da358fcbc3b650156dab705dfa34e.zip FreeBSD-src-65145fa4c81da358fcbc3b650156dab705dfa34e.tar.gz |
Merge sync of head
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/Makefile | 21 | ||||
-rw-r--r-- | usr.sbin/ppp/Makefile.depend | 1 | ||||
-rw-r--r-- | usr.sbin/ppp/command.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/iface.c | 3 | ||||
-rw-r--r-- | usr.sbin/ppp/ipcp.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/ipv6cp.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/radius.c | 2 | ||||
-rw-r--r-- | usr.sbin/ppp/server.c | 2 |
8 files changed, 17 insertions, 24 deletions
diff --git a/usr.sbin/ppp/Makefile b/usr.sbin/ppp/Makefile index dda493e..e0772af 100644 --- a/usr.sbin/ppp/Makefile +++ b/usr.sbin/ppp/Makefile @@ -31,6 +31,9 @@ PPP_NO_NETGRAPH= .if ${MK_PAM_SUPPORT} == "no" PPP_NO_PAM= .endif +.if ${MK_RADIUS_SUPPORT} == "no" +PPP_NO_RADIUS= +.endif .if defined(PPP_NO_SUID) BINMODE=554 @@ -41,8 +44,7 @@ BINOWN= root BINGRP= network M4FLAGS= -LDADD= -lcrypt -lmd -lutil -lz -DPADD= ${LIBCRYPT} ${LIBMD} ${LIBUTIL} ${LIBZ} +LIBADD= md util z .if defined(PPP_CONFDIR) && !empty(PPP_CONFDIR) CFLAGS+=-DPPP_CONFDIR=\"${PPP_CONFDIR}\" @@ -60,8 +62,7 @@ CFLAGS+=-DNOINET6 CFLAGS+=-DNONAT .else SRCS+= nat_cmd.c -LDADD+= -lalias -DPADD+= ${LIBALIAS} +LIBADD+= alias .endif .if defined(PPP_NO_ATM) @@ -80,24 +81,21 @@ SRCS+= id.c CFLAGS+=-DNODES .else SRCS+= chap_ms.c mppe.c -LDADD+= -lcrypto -DPADD+= ${LIBCRYPTO} +LIBADD+= crypto .endif .if defined(PPP_NO_RADIUS) CFLAGS+=-DNORADIUS .else SRCS+= radius.c -LDADD+= -lradius -DPADD+= ${LIBRADIUS} +LIBADD+= radius .endif .if defined(PPP_NO_NETGRAPH) CFLAGS+=-DNONETGRAPH .else SRCS+= ether.c -LDADD+= -lnetgraph -DPADD+= ${LIBNETGRAPH} +LIBADD+= netgraph .if defined(EXPERIMENTAL_NETGRAPH) CFLAGS+=-DEXPERIMENTAL_NETGRAPH SRCS+= netgraph.c @@ -107,8 +105,7 @@ SRCS+= netgraph.c .if defined(PPP_NO_PAM) CFLAGS+=-DNOPAM .else -LDADD+= ${MINUSLPAM} -DPADD+= ${LIBPAM} +LIBADD+= pam .endif .include <bsd.prog.mk> diff --git a/usr.sbin/ppp/Makefile.depend b/usr.sbin/ppp/Makefile.depend index e1dc9b4..6be8d6a 100644 --- a/usr.sbin/ppp/Makefile.depend +++ b/usr.sbin/ppp/Makefile.depend @@ -12,7 +12,6 @@ DIRDEPS = \ lib/libalias/libalias \ lib/libc \ lib/libcompiler_rt \ - lib/libcrypt \ lib/libmd \ lib/libnetgraph \ lib/libpam/libpam \ diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index 6bdf0c9..e90d96b 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -2051,7 +2051,7 @@ SetVariable(struct cmdargs const *arg) res = 1; } else { arg->bundle->radius.alive.interval = atoi(argp); - if (arg->bundle->radius.alive.interval && !arg->bundle->radius.cfg.file) { + if (arg->bundle->radius.alive.interval && !*arg->bundle->radius.cfg.file) { log_Printf(LogWARN, "rad_alive requires radius to be configured\n"); res = 1; } else if (arg->bundle->ncp.ipcp.fsm.state == ST_OPENED) { @@ -2335,7 +2335,7 @@ SetVariable(struct cmdargs const *arg) res = 1; } - if (arg->bundle->radius.port_id_type && !arg->bundle->radius.cfg.file) { + if (arg->bundle->radius.port_id_type && !*arg->bundle->radius.cfg.file) { log_Printf(LogWARN, "rad_port_id requires radius to be configured\n"); res = 1; } diff --git a/usr.sbin/ppp/iface.c b/usr.sbin/ppp/iface.c index 8fee189..5f17769 100644 --- a/usr.sbin/ppp/iface.c +++ b/usr.sbin/ppp/iface.c @@ -31,9 +31,6 @@ #include <netinet/in.h> #include <net/if.h> #include <net/if_dl.h> -#ifdef __FreeBSD__ -#include <net/if_var.h> -#endif #include <net/route.h> #include <netinet/in_systm.h> #include <netinet/in_var.h> diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c index 80b3a1b..dbb1e79 100644 --- a/usr.sbin/ppp/ipcp.c +++ b/usr.sbin/ppp/ipcp.c @@ -880,7 +880,7 @@ IpcpLayerDown(struct fsm *fp) radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links, RAD_STOP, &ipcp->throughput); - if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) + if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) system_Select(fp->bundle, fp->bundle->radius.filterid, LINKDOWNFILE, NULL, NULL); radius_StopTimer(&fp->bundle->radius); @@ -949,7 +949,7 @@ IpcpLayerUp(struct fsm *fp) radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links, RAD_START, &ipcp->throughput); - if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) + if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) system_Select(fp->bundle, fp->bundle->radius.filterid, LINKUPFILE, NULL, NULL); radius_StartTimer(fp->bundle); diff --git a/usr.sbin/ppp/ipv6cp.c b/usr.sbin/ppp/ipv6cp.c index 72c3b9a..9088680 100644 --- a/usr.sbin/ppp/ipv6cp.c +++ b/usr.sbin/ppp/ipv6cp.c @@ -486,7 +486,7 @@ ipv6cp_LayerUp(struct fsm *fp) * evaluated. */ if (!Enabled(fp->bundle, OPT_IPCP)) { - if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) + if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) system_Select(fp->bundle, fp->bundle->radius.filterid, LINKUPFILE, NULL, NULL); } @@ -539,7 +539,7 @@ ipv6cp_LayerDown(struct fsm *fp) * evaluated. */ if (!Enabled(fp->bundle, OPT_IPCP)) { - if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) + if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) system_Select(fp->bundle, fp->bundle->radius.filterid, LINKDOWNFILE, NULL, NULL); } diff --git a/usr.sbin/ppp/radius.c b/usr.sbin/ppp/radius.c index dc71ab3..f798141 100644 --- a/usr.sbin/ppp/radius.c +++ b/usr.sbin/ppp/radius.c @@ -1345,7 +1345,7 @@ radius_alive(void *v) void radius_StartTimer(struct bundle *bundle) { - if (bundle->radius.cfg.file && bundle->radius.alive.interval) { + if (*bundle->radius.cfg.file && bundle->radius.alive.interval) { bundle->radius.alive.timer.func = radius_alive; bundle->radius.alive.timer.name = "radius alive"; bundle->radius.alive.timer.load = bundle->radius.alive.interval * SECTICKS; diff --git a/usr.sbin/ppp/server.c b/usr.sbin/ppp/server.c index 864c627..3997eaf 100644 --- a/usr.sbin/ppp/server.c +++ b/usr.sbin/ppp/server.c @@ -248,7 +248,7 @@ server_LocalOpen(struct bundle *bundle, const char *name, mode_t mask) oldmask = (mode_t)-1; /* Silence compiler */ - if (server.cfg.sockname && !strcmp(server.cfg.sockname, name)) + if (server.cfg.sockname[0] != '\0' && !strcmp(server.cfg.sockname, name)) server_Close(bundle); memset(&ifsun, '\0', sizeof ifsun); |