summaryrefslogtreecommitdiffstats
path: root/usr.sbin/npppd/l2tp
diff options
context:
space:
mode:
authoryasuoka <yasuoka@openbsd.org>2010-01-13 07:49:44 +0000
committeryasuoka <yasuoka@openbsd.org>2010-01-13 07:49:44 +0000
commit53f89ef85193ed6f343b3e4c9f5d09d9d42d5fde (patch)
tree5fb3db3b7b505c12eb2358c2d6dfb0d38646da2d /usr.sbin/npppd/l2tp
parentcleanup pipex code. ok henning@ (diff)
downloadwireguard-openbsd-53f89ef85193ed6f343b3e4c9f5d09d9d42d5fde.tar.xz
wireguard-openbsd-53f89ef85193ed6f343b3e4c9f5d09d9d42d5fde.zip
cleanup npppd code. delete IIJ local ifdef switches and fix warnings.
ok @dlg
Diffstat (limited to 'usr.sbin/npppd/l2tp')
-rw-r--r--usr.sbin/npppd/l2tp/l2tp_call.c15
-rw-r--r--usr.sbin/npppd/l2tp/l2tp_ctrl.c18
-rw-r--r--usr.sbin/npppd/l2tp/l2tpd.c4
3 files changed, 5 insertions, 32 deletions
diff --git a/usr.sbin/npppd/l2tp/l2tp_call.c b/usr.sbin/npppd/l2tp/l2tp_call.c
index 02be6a1649b..f98e4fe0fa3 100644
--- a/usr.sbin/npppd/l2tp/l2tp_call.c
+++ b/usr.sbin/npppd/l2tp/l2tp_call.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* $Id: l2tp_call.c,v 1.1 2010/01/11 04:20:57 yasuoka Exp $ */
+/* $Id: l2tp_call.c,v 1.2 2010/01/13 07:49:44 yasuoka Exp $ */
/**@file
* L2TP LNS のコールの実装。
*/
@@ -1013,23 +1013,10 @@ l2tp_call_bind_ppp(l2tp_call *_this, dialin_proxy_info *dpi)
ppp->send_packet = l2tp_call_ppp_output;
ppp->phy_close = l2tp_call_closed_by_ppp;
-#ifdef IDGW_DIALIN
- if (DIALIN_PROXY_IS_REQUESTED(dpi)) {
- strlcpy(ppp->phy_label, L2TPD_DIALIN_LAYER2_LABEL,
- sizeof(ppp->phy_label));
- ppp->phy_info.peer_pn.pn_len = sizeof(npppd_phone_number);
- ppp->phy_info.peer_pn.pn_family = NPPPD_AF_PHONE_NUMBER;
- strlcpy(ppp->phy_info.peer_pn.pn_number, _this->calling_number,
- sizeof(ppp->phy_info.peer_pn.pn_number));
- } else {
-#endif
strlcpy(ppp->phy_label, _this->ctrl->phy_label,
sizeof(ppp->phy_label));
memcpy(&ppp->phy_info.peer_in, &_this->ctrl->peer,
_this->ctrl->peer.ss_len);
-#ifdef IDGW_DIALIN
- }
-#endif
strlcpy(ppp->calling_number, _this->calling_number,
sizeof(ppp->calling_number));
if (ppp_init(npppd_get_npppd(), ppp) != 0) {
diff --git a/usr.sbin/npppd/l2tp/l2tp_ctrl.c b/usr.sbin/npppd/l2tp/l2tp_ctrl.c
index 8ba251572d1..a7517b9f146 100644
--- a/usr.sbin/npppd/l2tp/l2tp_ctrl.c
+++ b/usr.sbin/npppd/l2tp/l2tp_ctrl.c
@@ -26,7 +26,7 @@
/**@file
* L2TP LNS のコントロールコネクションの処理を提供します。
*/
-// $Id: l2tp_ctrl.c,v 1.1 2010/01/11 04:20:57 yasuoka Exp $
+// $Id: l2tp_ctrl.c,v 1.2 2010/01/13 07:49:44 yasuoka Exp $
#include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h>
@@ -62,9 +62,6 @@
#include "net_utils.h"
#include "config_helper.h"
#include "version.h"
-#ifdef _SEIL_EXT_
-#include "rtev.h"
-#endif
static int l2tp_ctrl_init (l2tp_ctrl *, l2tpd *, struct sockaddr *, struct sockaddr *, void *);
static void l2tp_ctrl_reload (l2tp_ctrl *);
@@ -867,19 +864,6 @@ l2tp_ctrl_input(l2tpd *_this, int listener_index, struct sockaddr *peer,
l2tpd_log_access_deny(_this, errmsg, peer);
goto reigai;
}
-#if defined(_SEIL_EXT_) && !defined(USE_LIBSOCKUTIL)
- if (!rtev_ifa_is_primary(ifname, sock)) {
- char hostbuf[NI_MAXHOST];
- getnameinfo(sock, sock->sa_len, hostbuf,
- sizeof(hostbuf), NULL, 0, NI_NUMERICHOST);
- snprintf(errmsg, sizeof(errmsg),
- "connecting to %s (an alias address of %s)"
- " is not allowed by this version.",
- hostbuf, ifname);
- l2tpd_log_access_deny(_this, errmsg, peer);
- goto reigai;
- }
-#endif
}
if ((ctrl = l2tp_ctrl_create()) == NULL) {
diff --git a/usr.sbin/npppd/l2tp/l2tpd.c b/usr.sbin/npppd/l2tp/l2tpd.c
index f34f7e1cd2a..baa8604c135 100644
--- a/usr.sbin/npppd/l2tp/l2tpd.c
+++ b/usr.sbin/npppd/l2tp/l2tpd.c
@@ -29,7 +29,7 @@
/*
* RFC 2661
*/
-// $Id: l2tpd.c,v 1.1 2010/01/11 04:20:57 yasuoka Exp $
+// $Id: l2tpd.c,v 1.2 2010/01/13 07:49:44 yasuoka Exp $
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
@@ -411,7 +411,9 @@ l2tpd_start(l2tpd *_this)
_this->state = L2TPD_STATE_RUNNING;
return rval;
+#if 0
reigai:
+#endif
if (ipsec_policy_in != NULL)
free(ipsec_policy_in);
if (ipsec_policy_out != NULL)