summaryrefslogtreecommitdiff
path: root/sys/net/pipex.c
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2017-05-28 18:55:26 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2017-05-28 18:55:26 +0000
commitf49f0f2ab2c8d543f6fbae7d369a9e68826b1f2c (patch)
tree10623b734b1013ddad4ff8450cca3b36f1af4905 /sys/net/pipex.c
parent3557910fd071030ea23a8287871f02f13095cbe0 (diff)
Check also whether the interfaces is matched when pipex check PPPoE
packets. This fixes the problem when pipex connects with pppoe(4) through pair(4).
Diffstat (limited to 'sys/net/pipex.c')
-rw-r--r--sys/net/pipex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/pipex.c b/sys/net/pipex.c
index ba7840c803a..ecc599b99ab 100644
--- a/sys/net/pipex.c
+++ b/sys/net/pipex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pipex.c,v 1.98 2017/05/28 18:42:00 yasuoka Exp $ */
+/* $OpenBSD: pipex.c,v 1.99 2017/05/28 18:55:25 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -1296,6 +1296,8 @@ pipex_pppoe_lookup_session(struct mbuf *m0)
PIPEX_DBG((NULL, LOG_DEBUG, "<%s> session not found (id=%d)",
__func__, pppoe.session_id));
#endif
+ if (session && session->proto.pppoe.over_ifidx != m0->m_pkthdr.ph_ifidx)
+ session = NULL;
return (session);
}