diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2012-05-08 13:15:13 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2012-05-08 13:15:13 +0000 |
commit | 99013be6c7f3058d49532f6ddf47243060c0fbc7 (patch) | |
tree | 31e8aa0b5d8be7662377d0c11c85411ecb2d1520 | |
parent | f65340a7b560b789887dac26f3737467cda0da50 (diff) |
Fix comments and styles. Delete unused variables and labels.
No binary changes.
ok mcbride henning
71 files changed, 149 insertions, 179 deletions
diff --git a/usr.sbin/npppctl/parser.h b/usr.sbin/npppctl/parser.h index c3a1a7638ca..c7e3327586a 100644 --- a/usr.sbin/npppctl/parser.h +++ b/usr.sbin/npppctl/parser.h @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.h,v 1.1 2012/01/18 03:13:04 yasuoka Exp $ */ +/* $OpenBSD: parser.h,v 1.2 2012/05/08 13:15:11 yasuoka Exp $ */ /* This file is derived from OpenBSD:src/usr.sbin/ikectl/parser.h 1.9 */ /* @@ -50,4 +50,4 @@ struct parse_result { struct parse_result *parse(int, char *[]); enum protocol parse_protocol(const char *); -#endif /* _PPPCTL_PARSER_H */ +#endif /* _NPPPCTL_PARSER_H */ diff --git a/usr.sbin/npppd/Makefile b/usr.sbin/npppd/Makefile index 8625d0c1d0d..578905cd7e7 100644 --- a/usr.sbin/npppd/Makefile +++ b/usr.sbin/npppd/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.3 2012/01/18 03:13:04 yasuoka Exp $ +# $OpenBSD: Makefile,v 1.4 2012/05/08 13:15:11 yasuoka Exp $ # -# $Id: Makefile,v 1.3 2012/01/18 03:13:04 yasuoka Exp $ +# $Id: Makefile,v 1.4 2012/05/08 13:15:11 yasuoka Exp $ # SUBDIR+= npppd diff --git a/usr.sbin/npppd/Makefile.inc b/usr.sbin/npppd/Makefile.inc index 85102bef166..cf6e9603b5c 100644 --- a/usr.sbin/npppd/Makefile.inc +++ b/usr.sbin/npppd/Makefile.inc @@ -1,5 +1,5 @@ -# $OpenBSD: Makefile.inc,v 1.2 2010/07/01 03:38:17 yasuoka Exp $ -# $Id: Makefile.inc,v 1.2 2010/07/01 03:38:17 yasuoka Exp $ +# $OpenBSD: Makefile.inc,v 1.3 2012/05/08 13:15:11 yasuoka Exp $ +# $Id: Makefile.inc,v 1.3 2012/05/08 13:15:11 yasuoka Exp $ .include <bsd.own.mk> diff --git a/usr.sbin/npppd/common/addr_range.c b/usr.sbin/npppd/common/addr_range.c index fd1637a148b..5d259b90996 100644 --- a/usr.sbin/npppd/common/addr_range.c +++ b/usr.sbin/npppd/common/addr_range.c @@ -1,4 +1,4 @@ -/* $OpenBSD: addr_range.c,v 1.2 2010/07/01 03:38:17 yasuoka Exp $ */ +/* $OpenBSD: addr_range.c,v 1.3 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. * All rights reserved. @@ -56,7 +56,7 @@ * Author: * Yasuoka Masahiko <yasuoka@iij.ad.jp> * - * $Id: addr_range.c,v 1.2 2010/07/01 03:38:17 yasuoka Exp $ + * $Id: addr_range.c,v 1.3 2012/05/08 13:15:11 yasuoka Exp $ */ #ifdef ADDR_RANGE_DEBUG #define IIJDEBUG diff --git a/usr.sbin/npppd/common/addr_range.h b/usr.sbin/npppd/common/addr_range.h index 9ebb6bd93ed..5f72a6b2c59 100644 --- a/usr.sbin/npppd/common/addr_range.h +++ b/usr.sbin/npppd/common/addr_range.h @@ -1,4 +1,4 @@ -/* $OpenBSD: addr_range.h,v 1.2 2010/07/01 03:38:17 yasuoka Exp $ */ +/* $OpenBSD: addr_range.h,v 1.3 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. * All rights reserved. diff --git a/usr.sbin/npppd/common/bytebuf.c b/usr.sbin/npppd/common/bytebuf.c index 872c0f8fe40..786fdfc15a9 100644 --- a/usr.sbin/npppd/common/bytebuf.c +++ b/usr.sbin/npppd/common/bytebuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bytebuf.c,v 1.4 2012/02/24 06:19:00 guenther Exp $ */ +/* $OpenBSD: bytebuf.c,v 1.5 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. * All rights reserved. @@ -41,7 +41,7 @@ * }</pre> * * @author Yasuoka Masahiko - * $Id: bytebuf.c,v 1.4 2012/02/24 06:19:00 guenther Exp $ + * $Id: bytebuf.c,v 1.5 2012/05/08 13:15:11 yasuoka Exp $ */ #include <stdlib.h> #include <string.h> diff --git a/usr.sbin/npppd/common/bytebuf.h b/usr.sbin/npppd/common/bytebuf.h index 7127ac70c6a..d7110d243c6 100644 --- a/usr.sbin/npppd/common/bytebuf.h +++ b/usr.sbin/npppd/common/bytebuf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bytebuf.h,v 1.2 2010/07/01 03:38:17 yasuoka Exp $ */ +/* $OpenBSD: bytebuf.h,v 1.3 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. * All rights reserved. @@ -27,7 +27,7 @@ #ifndef BYTEBUF_H #define BYTEBUF_H 1 -/* $Id: bytebuf.h,v 1.2 2010/07/01 03:38:17 yasuoka Exp $ */ +/* $Id: bytebuf.h,v 1.3 2012/05/08 13:15:11 yasuoka Exp $ */ typedef struct _bytebuffer bytebuffer; diff --git a/usr.sbin/npppd/common/config_helper.c b/usr.sbin/npppd/common/config_helper.c index 5282d560cd3..30bab8488bb 100644 --- a/usr.sbin/npppd/common/config_helper.c +++ b/usr.sbin/npppd/common/config_helper.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config_helper.c,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: config_helper.c,v 1.4 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. * All rights reserved. @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Id: config_helper.c,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $Id: config_helper.c,v 1.4 2012/05/08 13:15:11 yasuoka Exp $ */ #include <sys/types.h> #include <stdio.h> #include <string.h> diff --git a/usr.sbin/npppd/common/config_helper.h b/usr.sbin/npppd/common/config_helper.h index 812e9763b60..fe79781ce66 100644 --- a/usr.sbin/npppd/common/config_helper.h +++ b/usr.sbin/npppd/common/config_helper.h @@ -1,4 +1,4 @@ -/* $OpenBSD: config_helper.h,v 1.2 2010/07/01 03:38:17 yasuoka Exp $ */ +/* $OpenBSD: config_helper.h,v 1.3 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. * All rights reserved. diff --git a/usr.sbin/npppd/common/csvreader.c b/usr.sbin/npppd/common/csvreader.c index f47d9d36c73..c905ece84fd 100644 --- a/usr.sbin/npppd/common/csvreader.c +++ b/usr.sbin/npppd/common/csvreader.c @@ -1,4 +1,4 @@ -/* $OpenBSD: csvreader.c,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: csvreader.c,v 1.4 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. * All rights reserved. @@ -54,7 +54,7 @@ * csvreader_destroy(csv); *</pre> */ -/* $Id: csvreader.c,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $Id: csvreader.c,v 1.4 2012/05/08 13:15:11 yasuoka Exp $ */ #include <unistd.h> #include <stdlib.h> #include <string.h> diff --git a/usr.sbin/npppd/common/csvreader.h b/usr.sbin/npppd/common/csvreader.h index 0d53c6aab90..6e0c3fbeaf4 100644 --- a/usr.sbin/npppd/common/csvreader.h +++ b/usr.sbin/npppd/common/csvreader.h @@ -1,4 +1,4 @@ -/* $OpenBSD: csvreader.h,v 1.2 2010/07/01 03:38:17 yasuoka Exp $ */ +/* $OpenBSD: csvreader.h,v 1.3 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. * All rights reserved. @@ -26,7 +26,7 @@ */ #ifndef CSVREADER_H #define CSVREADER_H 1 -/* $Id: csvreader.h,v 1.2 2010/07/01 03:38:17 yasuoka Exp $ */ +/* $Id: csvreader.h,v 1.3 2012/05/08 13:15:11 yasuoka Exp $ */ /** status of cvsreader */ typedef enum _CSVREADER_STATUS { diff --git a/usr.sbin/npppd/common/csvreader_test.c b/usr.sbin/npppd/common/csvreader_test.c index b5b329f3d00..40812e413e4 100644 --- a/usr.sbin/npppd/common/csvreader_test.c +++ b/usr.sbin/npppd/common/csvreader_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: csvreader_test.c,v 1.2 2010/07/01 03:38:17 yasuoka Exp $ */ +/* $OpenBSD: csvreader_test.c,v 1.3 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. * All rights reserved. @@ -27,7 +27,7 @@ /* * cc -o csvreader_test csvreader.c csvreader_test.c */ -/* $Id: csvreader_test.c,v 1.2 2010/07/01 03:38:17 yasuoka Exp $ */ +/* $Id: csvreader_test.c,v 1.3 2012/05/08 13:15:11 yasuoka Exp $ */ #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/usr.sbin/npppd/common/net_utils.c b/usr.sbin/npppd/common/net_utils.c index 76519143e13..467328f9072 100644 --- a/usr.sbin/npppd/common/net_utils.c +++ b/usr.sbin/npppd/common/net_utils.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Id: net_utils.c,v 1.2 2010/07/01 03:38:17 yasuoka Exp $ */ +/* $Id: net_utils.c,v 1.3 2012/05/08 13:15:11 yasuoka Exp $ */ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> @@ -87,8 +87,9 @@ get_ifname_by_sockaddr(struct sockaddr *sa, char *ifname) return ifname0; } + /** - * Cconvert argument like "192.168.160.1:1723/tcp" or "[::1]:1723/tcp" to + * Convert argument like "192.168.160.1:1723/tcp" or "[::1]:1723/tcp" to * match getaddrinfo(3)'s specification and pass them to getaddrinfo(3). */ int diff --git a/usr.sbin/npppd/l2tp/l2tp.h b/usr.sbin/npppd/l2tp/l2tp.h index b4896726d67..f055f8a8ce9 100644 --- a/usr.sbin/npppd/l2tp/l2tp.h +++ b/usr.sbin/npppd/l2tp/l2tp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: l2tp.h,v 1.6 2012/01/18 02:53:56 yasuoka Exp $ */ +/* $OpenBSD: l2tp.h,v 1.7 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -30,7 +30,7 @@ /*@file * header file for the L2TP module */ -/* $Id: l2tp.h,v 1.6 2012/01/18 02:53:56 yasuoka Exp $ */ +/* $Id: l2tp.h,v 1.7 2012/05/08 13:15:11 yasuoka Exp $ */ /************************************************************************ * Protocol Constants diff --git a/usr.sbin/npppd/l2tp/l2tp_call.c b/usr.sbin/npppd/l2tp/l2tp_call.c index 97cdcb91b3e..c7896096959 100644 --- a/usr.sbin/npppd/l2tp/l2tp_call.c +++ b/usr.sbin/npppd/l2tp/l2tp_call.c @@ -1,4 +1,4 @@ -/* $OpenBSD: l2tp_call.c,v 1.10 2012/01/23 03:41:21 yasuoka Exp $ */ +/* $OpenBSD: l2tp_call.c,v 1.11 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Id: l2tp_call.c,v 1.10 2012/01/23 03:41:21 yasuoka Exp $ */ +/* $Id: l2tp_call.c,v 1.11 2012/05/08 13:15:11 yasuoka Exp $ */ /**@file L2TP LNS call */ #include <sys/types.h> #include <sys/param.h> @@ -838,7 +838,7 @@ l2tp_call_log(l2tp_call *_this, int prio, const char *fmt, ...) va_list ap; va_start(ap, fmt); -#ifdef L2TPD_MULITPLE +#ifdef L2TPD_MULTIPLE snprintf(logbuf, sizeof(logbuf), "l2tpd id=%u ctrl=%u call=%u %s", _this->ctrl->l2tpd->id, _this->ctrl->id, _this->id, fmt); #else diff --git a/usr.sbin/npppd/l2tp/l2tp_ctrl.c b/usr.sbin/npppd/l2tp/l2tp_ctrl.c index f237d8f386b..ce7042bdd3d 100644 --- a/usr.sbin/npppd/l2tp/l2tp_ctrl.c +++ b/usr.sbin/npppd/l2tp/l2tp_ctrl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: l2tp_ctrl.c,v 1.8 2012/01/18 02:53:56 yasuoka Exp $ */ +/* $OpenBSD: l2tp_ctrl.c,v 1.9 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ /**@file Control connection processing functions for L2TP LNS */ -/* $Id: l2tp_ctrl.c,v 1.8 2012/01/18 02:53:56 yasuoka Exp $ */ +/* $Id: l2tp_ctrl.c,v 1.9 2012/05/08 13:15:11 yasuoka Exp $ */ #include <sys/types.h> #include <sys/param.h> #include <sys/time.h> @@ -258,18 +258,19 @@ l2tp_ctrl_send_disconnect_notify(l2tp_ctrl *_this) L2TP_CTRL_ASSERT(_this->state == L2TP_CTRL_STATE_ESTABLISHED || _this->state == L2TP_CTRL_STATE_CLEANUP_WAIT); - /* the contexts is not active or StopCCN have been sent */ + /* this control is not actively closing or StopCCN have been sent */ if (_this->active_closing == 0) return 0; - /* CDN have been sent for all Calls */ + /* Send CDN all Calls */ ncalls = 0; if (slist_length(&_this->call_list) != 0) { ncalls = l2tp_ctrl_disconnect_all_calls(_this); if (ncalls > 0) { /* - * Call l2tp_ctrl_disconnect_all_calls() to check - * the send window still filled. + * Call the function again to check whether the + * sending window is fulled. In case ncalls == 0, + * it means we've sent CDN for all calls. */ ncalls = l2tp_ctrl_disconnect_all_calls(_this); } @@ -288,7 +289,7 @@ l2tp_ctrl_send_disconnect_notify(l2tp_ctrl *_this) * Terminate the control connection * * <p> - * please spcify an appropriate value to result( >0 ) for + * please specify an appropriate value to result( >0 ) for * StopCCN ResultCode AVP, when to sent Active Close (which * require StopCCN sent).</p> * <p> @@ -1710,7 +1711,7 @@ l2tp_ctrl_log(l2tp_ctrl *_this, int prio, const char *fmt, ...) va_list ap; va_start(ap, fmt); -#ifdef L2TPD_MULITPLE +#ifdef L2TPD_MULTIPLE snprintf(logbuf, sizeof(logbuf), "l2tpd id=%u ctrl=%u %s", _this->l2tpd->id, _this->id, fmt); #else diff --git a/usr.sbin/npppd/l2tp/l2tp_local.h b/usr.sbin/npppd/l2tp/l2tp_local.h index 2fa37c6acee..1a5490dc3a9 100644 --- a/usr.sbin/npppd/l2tp/l2tp_local.h +++ b/usr.sbin/npppd/l2tp/l2tp_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: l2tp_local.h,v 1.4 2010/09/24 14:50:30 yasuoka Exp $ */ +/* $OpenBSD: l2tp_local.h,v 1.5 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. * All rights reserved. @@ -26,7 +26,7 @@ */ #ifndef L2TP_LOCAL_H #define L2TP_LOCAL_H 1 -/* $Id: l2tp_local.h,v 1.4 2010/09/24 14:50:30 yasuoka Exp $ */ +/* $Id: l2tp_local.h,v 1.5 2012/05/08 13:15:11 yasuoka Exp $ */ #ifndef GETSHORT #define GETSHORT(s, cp) { \ diff --git a/usr.sbin/npppd/l2tp/l2tp_subr.c b/usr.sbin/npppd/l2tp/l2tp_subr.c index a45a4cd2ac0..da1a0fe8c82 100644 --- a/usr.sbin/npppd/l2tp/l2tp_subr.c +++ b/usr.sbin/npppd/l2tp/l2tp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: l2tp_subr.c,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: l2tp_subr.c,v 1.4 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Id: l2tp_subr.c,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $Id: l2tp_subr.c,v 1.4 2012/05/08 13:15:11 yasuoka Exp $ */ /**@file L2TP related sub-routines */ #include <sys/types.h> #include <sys/time.h> diff --git a/usr.sbin/npppd/l2tp/l2tp_subr.h b/usr.sbin/npppd/l2tp/l2tp_subr.h index 7b605a4cfbb..dfa61cb3eef 100644 --- a/usr.sbin/npppd/l2tp/l2tp_subr.h +++ b/usr.sbin/npppd/l2tp/l2tp_subr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: l2tp_subr.h,v 1.4 2012/01/18 02:53:56 yasuoka Exp $ */ +/* $OpenBSD: l2tp_subr.h,v 1.5 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -27,7 +27,7 @@ */ #ifndef L2TP_SUBR_H #define L2TP_SUBR_H 1 -/* $Id: l2tp_subr.h,v 1.4 2012/01/18 02:53:56 yasuoka Exp $ */ +/* $Id: l2tp_subr.h,v 1.5 2012/05/08 13:15:11 yasuoka Exp $ */ /** * structure of L2TP Attribute Value Pair (AVP) packet header diff --git a/usr.sbin/npppd/l2tp/l2tpd.c b/usr.sbin/npppd/l2tp/l2tpd.c index 36efccb2c34..8b857d84234 100644 --- a/usr.sbin/npppd/l2tp/l2tpd.c +++ b/usr.sbin/npppd/l2tp/l2tpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: l2tpd.c,v 1.7 2012/01/18 02:53:56 yasuoka Exp $ */ +/* $OpenBSD: l2tpd.c,v 1.8 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ /**@file L2TP(Layer Two Tunneling Protocol "L2TP") / RFC2661 */ -/* $Id: l2tpd.c,v 1.7 2012/01/18 02:53:56 yasuoka Exp $ */ +/* $Id: l2tpd.c,v 1.8 2012/05/08 13:15:11 yasuoka Exp $ */ #include <sys/types.h> #include <sys/socket.h> #include <sys/time.h> @@ -298,15 +298,6 @@ l2tpd_listener_start(l2tpd_listener *_this, char *ipsec_policy_in, int sock, ival; l2tpd *_l2tpd; char hbuf[NI_MAXHOST + NI_MAXSERV + 16]; -#ifdef NPPPD_FAKEBIND - int wildcardbinding = 0; - extern void set_faith(int, int); - - /* XXX IPv6? */ - wildcardbinding = - (_this->bind.sin4.sin_family == AF_INET4 && - _this->bind.sin4.sin_addr.s_addr == INADDR_ANY)? 1 : 0; -#endif sock = -1; _l2tpd = _this->self; @@ -319,10 +310,6 @@ l2tpd_listener_start(l2tpd_listener *_this, char *ipsec_policy_in, "socket() failed in %s(): %m", __func__); goto fail; } -#ifdef NPPPD_FAKEBIND - if (!wildcardbinding) - set_faith(sock, 1); -#endif #if defined(IP_STRICT_RCVIF) && defined(USE_STRICT_RCVIF) ival = 1; if (setsockopt(sock, IPPROTO_IP, IP_STRICT_RCVIF, &ival, sizeof(ival)) @@ -353,20 +340,6 @@ l2tpd_listener_start(l2tpd_listener *_this, char *ipsec_policy_in, _this->bind.sin6.sin6_len, hbuf, sizeof(hbuf))); goto fail; } -#ifdef NPPPD_FAKEBIND - if (!wildcardbinding) - set_faith(sock, 0); -#endif -#ifdef UDP_NO_CKSUM - ival = 1; - if (setsockopt(sock, IPPROTO_UDP, UDP_NO_CKSUM, &ival, sizeof(ival)) - != 0) { - l2tpd_log(_l2tpd, LOG_ERR, - "setsockopt(,,UDP_NO_CKSUM) failed in %s(): %m", - __func__); - goto fail; - } -#endif #ifdef USE_LIBSOCKUTIL if (setsockoptfromto(sock) != 0) { l2tpd_log(_l2tpd, LOG_ERR, @@ -898,7 +871,7 @@ l2tpd_log(l2tpd *_this, int prio, const char *fmt, ...) va_list ap; va_start(ap, fmt); -#ifdef L2TPD_MULITPLE +#ifdef L2TPD_MULTIPLE snprintf(logbuf, sizeof(logbuf), "l2tpd id=%u %s", _this->id, fmt); #else snprintf(logbuf, sizeof(logbuf), "l2tpd %s", fmt); diff --git a/usr.sbin/npppd/npppd/ccp.c b/usr.sbin/npppd/npppd/ccp.c index 9364e658b4a..9cc4a532bc9 100644 --- a/usr.sbin/npppd/npppd/ccp.c +++ b/usr.sbin/npppd/npppd/ccp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ccp.c,v 1.4 2010/09/24 02:57:43 yasuoka Exp $ */ +/* $OpenBSD: ccp.c,v 1.5 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -28,7 +28,7 @@ /**@file * This file provides functions for CCP (Compression Control Protocol). * MPPE is supported as a CCP option. - * $Id: ccp.c,v 1.4 2010/09/24 02:57:43 yasuoka Exp $ + * $Id: ccp.c,v 1.5 2012/05/08 13:15:11 yasuoka Exp $ */ #include <sys/types.h> #include <sys/socket.h> diff --git a/usr.sbin/npppd/npppd/chap.c b/usr.sbin/npppd/npppd/chap.c index bb6fd991ef3..529007ab1b0 100644 --- a/usr.sbin/npppd/npppd/chap.c +++ b/usr.sbin/npppd/npppd/chap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: chap.c,v 1.5 2011/07/06 20:52:28 yasuoka Exp $ */ +/* $OpenBSD: chap.c,v 1.6 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -36,7 +36,7 @@ * </ul></p> */ /* RFC 1994, 2433 */ -/* $Id: chap.c,v 1.5 2011/07/06 20:52:28 yasuoka Exp $ */ +/* $Id: chap.c,v 1.6 2012/05/08 13:15:11 yasuoka Exp $ */ #include <sys/types.h> #include <sys/param.h> #include <sys/socket.h> diff --git a/usr.sbin/npppd/npppd/fsm.c b/usr.sbin/npppd/npppd/fsm.c index 69487a0bb7a..3a1d59474b3 100644 --- a/usr.sbin/npppd/npppd/fsm.c +++ b/usr.sbin/npppd/npppd/fsm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsm.c,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: fsm.c,v 1.4 2012/05/08 13:15:11 yasuoka Exp $ */ /**@file * This file was adapted from NetBSD:/usr/src/usr.sbin/pppd/pppd/fsm.c diff --git a/usr.sbin/npppd/npppd/fsm.h b/usr.sbin/npppd/npppd/fsm.h index 3d8b109b3e6..9c054d8321e 100644 --- a/usr.sbin/npppd/npppd/fsm.h +++ b/usr.sbin/npppd/npppd/fsm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fsm.h,v 1.4 2011/10/15 03:24:11 yasuoka Exp $ */ +/* $OpenBSD: fsm.h,v 1.5 2012/05/08 13:15:11 yasuoka Exp $ */ /* $NetBSD: fsm.h,v 1.10 2000/09/23 22:39:35 christos Exp $ */ /* diff --git a/usr.sbin/npppd/npppd/ipcp.c b/usr.sbin/npppd/npppd/ipcp.c index 4872d21c177..94d2544f36a 100644 --- a/usr.sbin/npppd/npppd/ipcp.c +++ b/usr.sbin/npppd/npppd/ipcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipcp.c,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: ipcp.c,v 1.4 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -32,7 +32,7 @@ /* * RFC 1332, 1877 */ -/* $Id: ipcp.c,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $Id: ipcp.c,v 1.4 2012/05/08 13:15:11 yasuoka Exp $ */ #include <sys/types.h> #include <sys/socket.h> #include <sys/time.h> diff --git a/usr.sbin/npppd/npppd/lcp.c b/usr.sbin/npppd/npppd/lcp.c index 25cd8ecd1a6..780e4470f9b 100644 --- a/usr.sbin/npppd/npppd/lcp.c +++ b/usr.sbin/npppd/npppd/lcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lcp.c,v 1.4 2011/07/06 20:52:28 yasuoka Exp $ */ +/* $OpenBSD: lcp.c,v 1.5 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Id: lcp.c,v 1.4 2011/07/06 20:52:28 yasuoka Exp $ */ +/* $Id: lcp.c,v 1.5 2012/05/08 13:15:11 yasuoka Exp $ */ /**@file * This file provides LCP related functions. *<pre> diff --git a/usr.sbin/npppd/npppd/mppe.c b/usr.sbin/npppd/npppd/mppe.c index 8365293332b..8f7deee6220 100644 --- a/usr.sbin/npppd/npppd/mppe.c +++ b/usr.sbin/npppd/npppd/mppe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mppe.c,v 1.5 2011/10/15 03:24:11 yasuoka Exp $ */ +/* $OpenBSD: mppe.c,v 1.6 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Id: mppe.c,v 1.5 2011/10/15 03:24:11 yasuoka Exp $ */ +/* $Id: mppe.c,v 1.6 2012/05/08 13:15:11 yasuoka Exp $ */ /**@file * * The implementation of MPPE(Microsoft Point-To-Point Encryption Protocol) @@ -349,6 +349,7 @@ mppe_create_our_bits(mppe *_this, uint32_t peer_bits) /** * receiving packets via MPPE. + * len must be 4 at least. */ void mppe_input(mppe *_this, u_char *pktp, int len) @@ -362,7 +363,7 @@ mppe_input(mppe *_this, u_char *pktp, int len) encrypt = 0; flushed = 0; - MPPE_ASSERT(len >= 2); + MPPE_ASSERT(len >= 4); pktp0 = pktp; GETSHORT(coher_cnt, pktp); diff --git a/usr.sbin/npppd/npppd/npppd.c b/usr.sbin/npppd/npppd/npppd.c index 3516179bca1..a84899228d2 100644 --- a/usr.sbin/npppd/npppd/npppd.c +++ b/usr.sbin/npppd/npppd/npppd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd.c,v 1.15 2012/01/23 03:36:22 yasuoka Exp $ */ +/* $OpenBSD: npppd.c,v 1.16 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -29,7 +29,7 @@ * Next pppd(nppd). This file provides a npppd daemon process and operations * for npppd instance. * @author Yasuoka Masahiko - * $Id: npppd.c,v 1.15 2012/01/23 03:36:22 yasuoka Exp $ + * $Id: npppd.c,v 1.16 2012/05/08 13:15:11 yasuoka Exp $ */ #include <sys/cdefs.h> #include "version.h" diff --git a/usr.sbin/npppd/npppd/npppd.h b/usr.sbin/npppd/npppd/npppd.h index 243efb59a62..4e1fb84838c 100644 --- a/usr.sbin/npppd/npppd/npppd.h +++ b/usr.sbin/npppd/npppd/npppd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd.h,v 1.8 2012/01/18 03:13:04 yasuoka Exp $ */ +/* $OpenBSD: npppd.h,v 1.9 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/npppd_auth.c b/usr.sbin/npppd/npppd/npppd_auth.c index 9138a691067..d811e48989c 100644 --- a/usr.sbin/npppd/npppd/npppd_auth.c +++ b/usr.sbin/npppd/npppd/npppd_auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_auth.c,v 1.7 2011/07/06 20:52:28 yasuoka Exp $ */ +/* $OpenBSD: npppd_auth.c,v 1.8 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ /**@file authentication realm */ -/* $Id: npppd_auth.c,v 1.7 2011/07/06 20:52:28 yasuoka Exp $ */ +/* $Id: npppd_auth.c,v 1.8 2012/05/08 13:15:11 yasuoka Exp $ */ /* I hope to write the source code in npppd-independent as possible. */ #include <sys/types.h> #include <sys/stat.h> @@ -55,6 +55,7 @@ #include "npppd_auth_local.h" +static const char *npppd_auth_default_label(npppd_auth_base *); /** * Create a npppd_auth_base object. * @param auth_type the authentication type. @@ -169,6 +170,7 @@ npppd_auth_destroy(npppd_auth_base *base) memset(base, 0, sizeof(npppd_auth_local)); break; +#ifdef USE_NPPPD_RADIUS case NPPPD_AUTH_TYPE_RADIUS: { npppd_auth_radius *_this = (npppd_auth_radius *)base; @@ -181,6 +183,7 @@ npppd_auth_destroy(npppd_auth_base *base) memset(base, 0, sizeof(npppd_auth_local)); break; } +#endif } free(base); diff --git a/usr.sbin/npppd/npppd/npppd_auth.h b/usr.sbin/npppd/npppd/npppd_auth.h index d84504f8836..e0fe830d052 100644 --- a/usr.sbin/npppd/npppd/npppd_auth.h +++ b/usr.sbin/npppd/npppd/npppd_auth.h @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_auth.h,v 1.4 2011/07/06 20:52:28 yasuoka Exp $ */ +/* $OpenBSD: npppd_auth.h,v 1.5 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/npppd_auth_local.h b/usr.sbin/npppd/npppd/npppd_auth_local.h index 04e8e605472..c6f0daadfc6 100644 --- a/usr.sbin/npppd/npppd/npppd_auth_local.h +++ b/usr.sbin/npppd/npppd/npppd_auth_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_auth_local.h,v 1.4 2011/07/06 20:52:28 yasuoka Exp $ */ +/* $OpenBSD: npppd_auth_local.h,v 1.5 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -110,7 +110,7 @@ static uint32_t str_hash (const void *, int); static const char * npppd_auth_default_label(npppd_auth_base *); static inline const char *npppd_auth_config_prefix (npppd_auth_base *); static const char *npppd_auth_config_str (npppd_auth_base *, const char *); -static int npppd_auth_config_int (npppd_auth_base *, const char *, int); +static int npppd_auth_config_int (npppd_auth_base *, const char *, int) __unused; static int npppd_auth_config_str_equal (npppd_auth_base *, const char *, const char *, int); #ifdef USE_NPPPD_RADIUS diff --git a/usr.sbin/npppd/npppd/npppd_config.c b/usr.sbin/npppd/npppd/npppd_config.c index d19d8fe8dba..cc118285509 100644 --- a/usr.sbin/npppd/npppd/npppd_config.c +++ b/usr.sbin/npppd/npppd/npppd_config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_config.c,v 1.7 2012/01/18 03:13:04 yasuoka Exp $ */ +/* $OpenBSD: npppd_config.c,v 1.8 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Id: npppd_config.c,v 1.7 2012/01/18 03:13:04 yasuoka Exp $ */ +/* $Id: npppd_config.c,v 1.8 2012/05/08 13:15:11 yasuoka Exp $ */ /*@file * This file provides functions which operates configuration and so on. */ diff --git a/usr.sbin/npppd/npppd/npppd_ctl.c b/usr.sbin/npppd/npppd/npppd_ctl.c index 67879110c8c..a190a02ac61 100644 --- a/usr.sbin/npppd/npppd/npppd_ctl.c +++ b/usr.sbin/npppd/npppd/npppd_ctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_ctl.c,v 1.8 2012/01/18 03:13:04 yasuoka Exp $ */ +/* $OpenBSD: npppd_ctl.c,v 1.9 2012/05/08 13:15:11 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -30,7 +30,7 @@ * This file provides to open UNIX domain socket which located in * /var/run/npppd_ctl and accept commmands from the npppdctl command. */ -/* $Id: npppd_ctl.c,v 1.8 2012/01/18 03:13:04 yasuoka Exp $ */ +/* $Id: npppd_ctl.c,v 1.9 2012/05/08 13:15:11 yasuoka Exp $ */ #include <sys/types.h> #include <sys/param.h> #include <sys/socket.h> @@ -420,7 +420,7 @@ cmd_disconnect_fail: npppd_ctl_log(_this, LOG_ERR, "Received unknown command %04x", command); } -fail: + return; } diff --git a/usr.sbin/npppd/npppd/npppd_ctl.h b/usr.sbin/npppd/npppd/npppd_ctl.h index 2bb3d996dea..fd0386c2712 100644 --- a/usr.sbin/npppd/npppd/npppd_ctl.h +++ b/usr.sbin/npppd/npppd/npppd_ctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_ctl.h,v 1.4 2012/01/18 03:13:04 yasuoka Exp $ */ +/* $OpenBSD: npppd_ctl.h,v 1.5 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/npppd_defs.h b/usr.sbin/npppd/npppd/npppd_defs.h index 512439926b0..a8553afa214 100644 --- a/usr.sbin/npppd/npppd/npppd_defs.h +++ b/usr.sbin/npppd/npppd/npppd_defs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_defs.h,v 1.6 2012/01/18 03:13:04 yasuoka Exp $ */ +/* $OpenBSD: npppd_defs.h,v 1.7 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/npppd_iface.c b/usr.sbin/npppd/npppd/npppd_iface.c index 59b5b2a0312..137ebc5cc06 100644 --- a/usr.sbin/npppd/npppd/npppd_iface.c +++ b/usr.sbin/npppd/npppd/npppd_iface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_iface.c,v 1.5 2011/04/02 12:04:44 dlg Exp $ */ +/* $OpenBSD: npppd_iface.c,v 1.6 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Id: npppd_iface.c,v 1.5 2011/04/02 12:04:44 dlg Exp $ */ +/* $Id: npppd_iface.c,v 1.6 2012/05/08 13:15:12 yasuoka Exp $ */ /**@file * The interface of npppd and kernel. * This is an implementation to use tun(4) or pppx(4). diff --git a/usr.sbin/npppd/npppd/npppd_iface.h b/usr.sbin/npppd/npppd/npppd_iface.h index 25b419698fe..9ae21ce2e98 100644 --- a/usr.sbin/npppd/npppd/npppd_iface.h +++ b/usr.sbin/npppd/npppd/npppd_iface.h @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_iface.h,v 1.4 2011/04/02 12:04:44 dlg Exp $ */ +/* $OpenBSD: npppd_iface.h,v 1.5 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/npppd_local.h b/usr.sbin/npppd/npppd/npppd_local.h index 017c4bf3a40..773c36971b8 100644 --- a/usr.sbin/npppd/npppd/npppd_local.h +++ b/usr.sbin/npppd/npppd/npppd_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_local.h,v 1.8 2012/01/18 03:13:04 yasuoka Exp $ */ +/* $OpenBSD: npppd_local.h,v 1.9 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/npppd_pool.c b/usr.sbin/npppd/npppd/npppd_pool.c index e97a7515b50..c9f4160463c 100644 --- a/usr.sbin/npppd/npppd/npppd_pool.c +++ b/usr.sbin/npppd/npppd/npppd_pool.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_pool.c,v 1.5 2012/01/18 02:53:56 yasuoka Exp $ */ +/* $OpenBSD: npppd_pool.c,v 1.6 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -324,10 +324,6 @@ npppd_pool_get_dynamic(npppd_pool *_this, npppd_ppp *ppp) { int shuffle_cnt; uintptr_t result = 0; - struct sockaddr_in sin4 = { - .sin_len = sizeof(struct sockaddr_in), - .sin_family = AF_INET - }; struct sockaddr_npppd *snp; npppd_ppp *ppp0; @@ -341,9 +337,9 @@ npppd_pool_get_dynamic(npppd_pool *_this, npppd_ppp *ppp) /* shuffle */ if ((uint32_t)result == SHUFLLE_MARK) { /* - * In case of no address to use, - * keep suffling and get address if length > 1. - * If succeed to get address twice, it means no address to use. + * When the free list is empty, SHUFLLE_MARK is + * retrieved twice sequentially. This means there is + * no address to use. */ if (shuffle_cnt++ > 0) { result = 0; @@ -364,20 +360,13 @@ npppd_pool_get_dynamic(npppd_pool *_this, npppd_ppp *ppp) /* only succeed here */ return (uint32_t)result; default: - /* In case that the pool address is same as interface address, */ /* - * Because the pool address is deleted from the list, - * It has issue of address leak when interface address is changed. - * But it will make no problem because there is no situation that - * changing the pool address only in current implementation. - * In operation, It is hard to assume that the pool address is not - * changed and the tunnel-end-address is changed periodically. + * Used as a interface address */ continue; case ADDRESS_BUSY: - sin4.sin_addr.s_addr = htonl((uint32_t)result); /* - * Because of reloading configuration, reset active PPP session. + * Used by the previous configuration. */ NPPPD_POOL_ASSERT(snp != NULL); NPPPD_POOL_ASSERT(snp->snp_type == SNP_PPP); @@ -476,8 +465,7 @@ npppd_pool_release_ip(npppd_pool *_this, npppd_ppp *ppp) }; /* - * _this == NULL the pool address is released becaus of changing - * configuration. + * `_this' may be NULL. It was gone because of a configuration change. */ if (!ppp_ip_assigned(ppp)) return; @@ -495,16 +483,18 @@ npppd_pool_release_ip(npppd_pool *_this, npppd_ppp *ppp) } snp = item; - if (_this != NULL && ppp->assign_dynapool != 0) + if (_this != NULL && ppp->assign_dynapool != 0) { + NPPPD_POOL_ASSERT(_this == ppp->assigned_pool); /* return to dynamic address pool list */ slist_add(&((npppd_pool *)ppp->assigned_pool)->dyna_addrs, (void *)(uintptr_t)ntohl( ppp->ppp_framed_ip_address.s_addr)); + } if (snp != NULL && snp->snp_next != NULL) { /* - * Radish entry is registered to list, if address/mask of - * this entry and the next is the same, the next is registered again. + * The radish entry is registered as a list. Insert the next + * of the list to the radish tree. */ if (rd_insert(SA(&addr), SA(&mask), ppp->pppd->rd, snp->snp_next) != 0) { diff --git a/usr.sbin/npppd/npppd/npppd_pool.h b/usr.sbin/npppd/npppd/npppd_pool.h index cb1d61530d2..e47f0e74ebb 100644 --- a/usr.sbin/npppd/npppd/npppd_pool.h +++ b/usr.sbin/npppd/npppd/npppd_pool.h @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_pool.h,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: npppd_pool.h,v 1.4 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/npppd_subr.c b/usr.sbin/npppd/npppd/npppd_subr.c index 3d0afe2815f..bd920cd2bbe 100644 --- a/usr.sbin/npppd/npppd/npppd_subr.c +++ b/usr.sbin/npppd/npppd/npppd_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_subr.c,v 1.6 2010/09/23 01:45:10 jsg Exp $ */ +/* $OpenBSD: npppd_subr.c,v 1.7 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -28,7 +28,7 @@ /**@file * This file provides helper functions for npppd. */ -/* $Id: npppd_subr.c,v 1.6 2010/09/23 01:45:10 jsg Exp $ */ +/* $Id: npppd_subr.c,v 1.7 2012/05/08 13:15:12 yasuoka Exp $ */ #include <sys/cdefs.h> #ifndef LINT __COPYRIGHT( diff --git a/usr.sbin/npppd/npppd/npppd_subr.h b/usr.sbin/npppd/npppd/npppd_subr.h index f165ceb470c..87a8f4b52f4 100644 --- a/usr.sbin/npppd/npppd/npppd_subr.h +++ b/usr.sbin/npppd/npppd/npppd_subr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_subr.h,v 1.2 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: npppd_subr.h,v 1.3 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/npppd_tun.c b/usr.sbin/npppd/npppd/npppd_tun.c index 7ac47491bc9..28631bb4be4 100644 --- a/usr.sbin/npppd/npppd/npppd_tun.c +++ b/usr.sbin/npppd/npppd/npppd_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_tun.c,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: npppd_tun.c,v 1.4 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/npppd_tun.h b/usr.sbin/npppd/npppd/npppd_tun.h index 2ca31bf9f11..82531be5d4f 100644 --- a/usr.sbin/npppd/npppd/npppd_tun.h +++ b/usr.sbin/npppd/npppd/npppd_tun.h @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_tun.h,v 1.2 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: npppd_tun.h,v 1.3 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/pap.c b/usr.sbin/npppd/npppd/pap.c index d5bf98408ee..40496ea680a 100644 --- a/usr.sbin/npppd/npppd/pap.c +++ b/usr.sbin/npppd/npppd/pap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pap.c,v 1.4 2011/07/06 20:52:28 yasuoka Exp $ */ +/* $OpenBSD: pap.c,v 1.5 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Id: pap.c,v 1.4 2011/07/06 20:52:28 yasuoka Exp $ */ +/* $Id: pap.c,v 1.5 2012/05/08 13:15:12 yasuoka Exp $ */ /**@file * This file provides Password Authentication Protocol (PAP) handlers. * @author Yasuoka Masahiko diff --git a/usr.sbin/npppd/npppd/pathnames.h b/usr.sbin/npppd/npppd/pathnames.h index 34086534ba0..68d24dddbaa 100644 --- a/usr.sbin/npppd/npppd/pathnames.h +++ b/usr.sbin/npppd/npppd/pathnames.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pathnames.h,v 1.4 2012/01/18 03:13:04 yasuoka Exp $ */ +/* $OpenBSD: pathnames.h,v 1.5 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/ppp.c b/usr.sbin/npppd/npppd/ppp.c index e8a35197cbf..aef1fb5b0bd 100644 --- a/usr.sbin/npppd/npppd/ppp.c +++ b/usr.sbin/npppd/npppd/ppp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ppp.c,v 1.12 2012/01/23 03:36:22 yasuoka Exp $ */ +/* $OpenBSD: ppp.c,v 1.13 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Id: ppp.c,v 1.12 2012/01/23 03:36:22 yasuoka Exp $ */ +/* $Id: ppp.c,v 1.13 2012/05/08 13:15:12 yasuoka Exp $ */ /**@file * This file provides PPP(Point-to-Point Protocol, RFC 1661) and * {@link :: _npppd_ppp PPP instance} related functions. diff --git a/usr.sbin/npppd/npppd/ppp.h b/usr.sbin/npppd/npppd/ppp.h index 55ea451233b..d0ed2deaa7e 100644 --- a/usr.sbin/npppd/npppd/ppp.h +++ b/usr.sbin/npppd/npppd/ppp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ppp.h,v 1.9 2012/01/23 03:36:22 yasuoka Exp $ */ +/* $OpenBSD: ppp.h,v 1.10 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -421,8 +421,10 @@ typedef struct _mppe { /* * configuration parameters. */ - uint16_t enabled :1, /* if 0 No MPPE */ - required :1, /* if 1 MPPE is optional */ + uint16_t /* if 0 no MPPE */ + enabled :1, + /* if 1 don't forward packet without MPPE */ + required :1, mode_auto :1, keylen_auto :1, mode_stateless :1, @@ -459,7 +461,7 @@ struct _npppd_ppp { int timeout_sec; /** Physical layer */ - int tunnel_type; /** PPP Tunnel TYpe */ + int tunnel_type; /** PPP Tunnel Type */ uint16_t mru; /** MRU */ uint16_t peer_mru; /** Peer's MRU */ void *phy_context; /** Context of physical layer */ @@ -618,7 +620,7 @@ typedef struct _dialin_proxy_info { /** LCP data */ u_char data[256]; } /** the last sent LCP */ last_sent_lcp, - /** the last recevied LCP */ last_recv_lcp; + /** the last received LCP */ last_recv_lcp; /** ID of authentication packet */ int auth_id; diff --git a/usr.sbin/npppd/npppd/privsep.c b/usr.sbin/npppd/npppd/privsep.c index b5865b41671..cd10d3062dd 100644 --- a/usr.sbin/npppd/npppd/privsep.c +++ b/usr.sbin/npppd/npppd/privsep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.c,v 1.4 2012/01/18 03:13:04 yasuoka Exp $ */ +/* $OpenBSD: privsep.c,v 1.5 2012/05/08 13:15:12 yasuoka Exp $ */ /* * Copyright (c) 2010 Yasuoka Masahiko <yasuoka@openbsd.org> diff --git a/usr.sbin/npppd/npppd/privsep.h b/usr.sbin/npppd/npppd/privsep.h index f654ae49a9f..0486dbef5c1 100644 --- a/usr.sbin/npppd/npppd/privsep.h +++ b/usr.sbin/npppd/npppd/privsep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.h,v 1.3 2012/01/18 03:13:04 yasuoka Exp $ */ +/* $OpenBSD: privsep.h,v 1.4 2012/05/08 13:15:12 yasuoka Exp $ */ /* * Copyright (c) 2010 Yasuoka Masahiko <yasuoka@openbsd.org> diff --git a/usr.sbin/npppd/npppd/psm-opt.h b/usr.sbin/npppd/npppd/psm-opt.h index f8885996433..818d57858c8 100644 --- a/usr.sbin/npppd/npppd/psm-opt.h +++ b/usr.sbin/npppd/npppd/psm-opt.h @@ -1,4 +1,4 @@ -/* $OpenBSD: psm-opt.h,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: psm-opt.h,v 1.4 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -43,7 +43,7 @@ * // Mark peer rejects "Address and Control Field Compression" option. * psm_peer_opt_set_reject(lcp, acfc, true) * </pre></p> - * $Id: psm-opt.h,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ + * $Id: psm-opt.h,v 1.4 2012/05/08 13:15:12 yasuoka Exp $ */ #define PSM_OPT_REQUEST_OURS 0x01 diff --git a/usr.sbin/npppd/npppd/radius+.c b/usr.sbin/npppd/npppd/radius+.c index 91dbf873547..a46962afb04 100644 --- a/usr.sbin/npppd/npppd/radius+.c +++ b/usr.sbin/npppd/npppd/radius+.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radius+.c,v 1.5 2012/01/18 02:53:56 yasuoka Exp $ */ +/* $OpenBSD: radius+.c,v 1.6 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/radius+.h b/usr.sbin/npppd/npppd/radius+.h index 0bdef81e3bf..e8fff6859a1 100644 --- a/usr.sbin/npppd/npppd/radius+.h +++ b/usr.sbin/npppd/npppd/radius+.h @@ -1,4 +1,4 @@ -/* $OpenBSD: radius+.h,v 1.4 2011/07/06 20:52:28 yasuoka Exp $ */ +/* $OpenBSD: radius+.h,v 1.5 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/radius+_local.h b/usr.sbin/npppd/npppd/radius+_local.h index 4d3601362ba..1c0f752175e 100644 --- a/usr.sbin/npppd/npppd/radius+_local.h +++ b/usr.sbin/npppd/npppd/radius+_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: radius+_local.h,v 1.4 2011/07/06 20:52:28 yasuoka Exp $ */ +/* $OpenBSD: radius+_local.h,v 1.5 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/radius_chap_const.h b/usr.sbin/npppd/npppd/radius_chap_const.h index 55fcd41bb7f..482979390a1 100644 --- a/usr.sbin/npppd/npppd/radius_chap_const.h +++ b/usr.sbin/npppd/npppd/radius_chap_const.h @@ -1,4 +1,4 @@ -/* $OpenBSD: radius_chap_const.h,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: radius_chap_const.h,v 1.4 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/radius_req.c b/usr.sbin/npppd/npppd/radius_req.c index 1b9d098eb99..98f9b84f6a2 100644 --- a/usr.sbin/npppd/npppd/radius_req.c +++ b/usr.sbin/npppd/npppd/radius_req.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radius_req.c,v 1.4 2011/07/06 20:52:28 yasuoka Exp $ */ +/* $OpenBSD: radius_req.c,v 1.5 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -28,7 +28,7 @@ /**@file * This file provides functions for RADIUS request using radius+.c and event(3). * @author Yasuoka Masahiko - * $Id: radius_req.c,v 1.4 2011/07/06 20:52:28 yasuoka Exp $ + * $Id: radius_req.c,v 1.5 2012/05/08 13:15:12 yasuoka Exp $ */ #include <sys/types.h> #include <sys/param.h> diff --git a/usr.sbin/npppd/npppd/radius_req.h b/usr.sbin/npppd/npppd/radius_req.h index b2a70146ca4..6704c731db7 100644 --- a/usr.sbin/npppd/npppd/radius_req.h +++ b/usr.sbin/npppd/npppd/radius_req.h @@ -1,4 +1,4 @@ -/* $OpenBSD: radius_req.h,v 1.4 2011/07/06 20:52:28 yasuoka Exp $ */ +/* $OpenBSD: radius_req.h,v 1.5 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/radiusconst.h b/usr.sbin/npppd/npppd/radiusconst.h index 0fbbe0a9e5f..e80fd1f82dd 100644 --- a/usr.sbin/npppd/npppd/radiusconst.h +++ b/usr.sbin/npppd/npppd/radiusconst.h @@ -1,4 +1,4 @@ -/* $OpenBSD: radiusconst.h,v 1.4 2011/07/06 20:52:28 yasuoka Exp $ */ +/* $OpenBSD: radiusconst.h,v 1.5 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/npppd/version.h b/usr.sbin/npppd/npppd/version.h index 0b0762dfac1..71bdce5a068 100644 --- a/usr.sbin/npppd/npppd/version.h +++ b/usr.sbin/npppd/npppd/version.h @@ -1,4 +1,4 @@ -/* $OpenBSD: version.h,v 1.2 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: version.h,v 1.3 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/pppoe/pppoe.h b/usr.sbin/npppd/pppoe/pppoe.h index 6120f3e0211..d0c896dca0e 100644 --- a/usr.sbin/npppd/pppoe/pppoe.h +++ b/usr.sbin/npppd/pppoe/pppoe.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pppoe.h,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: pppoe.h,v 1.4 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/pppoe/pppoe_local.h b/usr.sbin/npppd/pppoe/pppoe_local.h index b254addbe4d..e741f46a3dc 100644 --- a/usr.sbin/npppd/pppoe/pppoe_local.h +++ b/usr.sbin/npppd/pppoe/pppoe_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pppoe_local.h,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: pppoe_local.h,v 1.4 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/pppoe/pppoe_session.c b/usr.sbin/npppd/pppoe/pppoe_session.c index 4816c997a49..87842baf535 100644 --- a/usr.sbin/npppd/pppoe/pppoe_session.c +++ b/usr.sbin/npppd/pppoe/pppoe_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pppoe_session.c,v 1.5 2012/01/18 02:53:56 yasuoka Exp $ */ +/* $OpenBSD: pppoe_session.c,v 1.6 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -28,7 +28,7 @@ /**@file * Session management of PPPoE protocol - * $Id: pppoe_session.c,v 1.5 2012/01/18 02:53:56 yasuoka Exp $ + * $Id: pppoe_session.c,v 1.6 2012/05/08 13:15:12 yasuoka Exp $ */ #include <sys/types.h> @@ -424,7 +424,7 @@ pppoe_session_log(pppoe_session *_this, int prio, const char *fmt, ...) PPPOE_SESSION_ASSERT(_this != NULL); va_start(ap, fmt); -#ifdef PPPOED_MULITPLE +#ifdef PPPOED_MULTIPLE snprintf(logbuf, sizeof(logbuf), "pppoed id=%u session=%d %s", _this->pppoed->id, _this->session_id, fmt); #else diff --git a/usr.sbin/npppd/pppoe/pppoed.c b/usr.sbin/npppd/pppoe/pppoed.c index f8efdf60064..f63ed7afa8c 100644 --- a/usr.sbin/npppd/pppoe/pppoed.c +++ b/usr.sbin/npppd/pppoe/pppoed.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pppoed.c,v 1.8 2012/01/18 02:53:56 yasuoka Exp $ */ +/* $OpenBSD: pppoed.c,v 1.9 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -28,7 +28,7 @@ /**@file * This file provides the PPPoE(RFC2516) server(access concentrator) * implementaion. - * $Id: pppoed.c,v 1.8 2012/01/18 02:53:56 yasuoka Exp $ + * $Id: pppoed.c,v 1.9 2012/05/08 13:15:12 yasuoka Exp $ */ #include <sys/types.h> #include <sys/param.h> @@ -1131,7 +1131,7 @@ pppoed_log(pppoed *_this, int prio, const char *fmt, ...) PPPOED_ASSERT(_this != NULL); va_start(ap, fmt); -#ifdef PPPOED_MULITPLE +#ifdef PPPOED_MULTIPLE snprintf(logbuf, sizeof(logbuf), "pppoed id=%u %s", _this->id, fmt); #else snprintf(logbuf, sizeof(logbuf), "pppoed %s", fmt); diff --git a/usr.sbin/npppd/pptp/pptp.h b/usr.sbin/npppd/pptp/pptp.h index bbefc5af350..00cdb88a188 100644 --- a/usr.sbin/npppd/pptp/pptp.h +++ b/usr.sbin/npppd/pptp/pptp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pptp.h,v 1.6 2011/10/15 03:24:11 yasuoka Exp $ */ +/* $OpenBSD: pptp.h,v 1.7 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/pptp/pptp_call.c b/usr.sbin/npppd/pptp/pptp_call.c index b67da7f2698..49587359b66 100644 --- a/usr.sbin/npppd/pptp/pptp_call.c +++ b/usr.sbin/npppd/pptp/pptp_call.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pptp_call.c,v 1.5 2012/01/18 03:13:04 yasuoka Exp $ */ +/* $OpenBSD: pptp_call.c,v 1.6 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Id: pptp_call.c,v 1.5 2012/01/18 03:13:04 yasuoka Exp $ */ +/* $Id: pptp_call.c,v 1.6 2012/05/08 13:15:12 yasuoka Exp $ */ /**@file PPTP Call */ /* currently it supports PAC mode only */ #include <sys/types.h> @@ -125,7 +125,6 @@ pptp_call_init(pptp_call *_this, pptp_ctrl *ctrl) _this->snd_nxt = 1; return 0; - return 1; } int @@ -783,7 +782,7 @@ pptp_call_log(pptp_call *_this, int prio, const char *fmt, ...) va_list ap; va_start(ap, fmt); -#ifdef PPTPD_MULITPLE +#ifdef PPTPD_MULTIPLE snprintf(logbuf, sizeof(logbuf), "pptpd id=%u ctrl=%u call=%u %s", _this->ctrl->pptpd->id, _this->ctrl->id, _this->id, fmt); #else diff --git a/usr.sbin/npppd/pptp/pptp_ctrl.c b/usr.sbin/npppd/pptp/pptp_ctrl.c index fe82744d970..9d84bd85587 100644 --- a/usr.sbin/npppd/pptp/pptp_ctrl.c +++ b/usr.sbin/npppd/pptp/pptp_ctrl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pptp_ctrl.c,v 1.4 2011/03/16 09:48:45 okan Exp $ */ +/* $OpenBSD: pptp_ctrl.c,v 1.5 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -29,7 +29,7 @@ * PPTP(RFC 2637) control connection implementation. * currently it only support PAC part */ -/* $Id: pptp_ctrl.c,v 1.4 2011/03/16 09:48:45 okan Exp $ */ +/* $Id: pptp_ctrl.c,v 1.5 2012/05/08 13:15:12 yasuoka Exp $ */ #include <sys/types.h> #include <sys/param.h> #include <sys/socket.h> @@ -1148,7 +1148,7 @@ pptp_ctrl_log(pptp_ctrl *_this, int prio, const char *fmt, ...) va_list ap; va_start(ap, fmt); -#ifdef PPTPD_MULITPLE +#ifdef PPTPD_MULTIPLE snprintf(logbuf, sizeof(logbuf), "pptpd id=%u ctrl=%u %s", _this->pptpd->id, _this->id, fmt); #else diff --git a/usr.sbin/npppd/pptp/pptp_local.h b/usr.sbin/npppd/pptp/pptp_local.h index 182837d154a..a0820e65867 100644 --- a/usr.sbin/npppd/pptp/pptp_local.h +++ b/usr.sbin/npppd/pptp/pptp_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pptp_local.h,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: pptp_local.h,v 1.4 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/pptp/pptp_subr.c b/usr.sbin/npppd/pptp/pptp_subr.c index 6d217aebeb3..5025ae17e8a 100644 --- a/usr.sbin/npppd/pptp/pptp_subr.c +++ b/usr.sbin/npppd/pptp/pptp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pptp_subr.c,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: pptp_subr.c,v 1.4 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/pptp/pptp_subr.h b/usr.sbin/npppd/pptp/pptp_subr.h index 3d29b23437e..e642b27bb60 100644 --- a/usr.sbin/npppd/pptp/pptp_subr.h +++ b/usr.sbin/npppd/pptp/pptp_subr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pptp_subr.h,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: pptp_subr.h,v 1.4 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. diff --git a/usr.sbin/npppd/pptp/pptpd.c b/usr.sbin/npppd/pptp/pptpd.c index fd6cd8e921a..cb5b86bf78f 100644 --- a/usr.sbin/npppd/pptp/pptpd.c +++ b/usr.sbin/npppd/pptp/pptpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pptpd.c,v 1.9 2012/01/18 02:53:56 yasuoka Exp $ */ +/* $OpenBSD: pptpd.c,v 1.10 2012/05/08 13:15:12 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -25,12 +25,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Id: pptpd.c,v 1.9 2012/01/18 02:53:56 yasuoka Exp $ */ +/* $Id: pptpd.c,v 1.10 2012/05/08 13:15:12 yasuoka Exp $ */ /**@file * This file provides a implementation of PPTP daemon. Currently it * provides functions for PAC (PPTP Access Concentrator) only. - * $Id: pptpd.c,v 1.9 2012/01/18 02:53:56 yasuoka Exp $ + * $Id: pptpd.c,v 1.10 2012/05/08 13:15:12 yasuoka Exp $ */ #include <sys/types.h> #include <sys/param.h> @@ -1083,7 +1083,7 @@ pptpd_log(pptpd *_this, int prio, const char *fmt, ...) PPTPD_ASSERT(_this != NULL); va_start(ap, fmt); -#ifdef PPTPD_MULITPLE +#ifdef PPTPD_MULTIPLE snprintf(logbuf, sizeof(logbuf), "pptpd id=%u %s", _this->id, fmt); #else snprintf(logbuf, sizeof(logbuf), "pptpd %s", fmt); |