summaryrefslogtreecommitdiff
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2012-04-04 04:31:39 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2012-04-04 04:31:39 +0000
commit3ea373e94d2c829a615b076e1bbc540ffbf7ac50 (patch)
treed29d4a9a80d66247c96d0c3c37f396cd7685c58f /sys/netinet/udp_usrreq.c
parent6380067e84f8ff0d74edc5890a5c22ee00c4314a (diff)
pipex hook in udp_usrreq() mistakenly assumed that `inp' is connected.
It could not use the destination address properly, so it failed to find the pipex session. This bug caused LCP keepalive failures on some clients. found and tested by sebastia@ and mxb at alumni.chalmers.se. ok sthen
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 460711190e2..67f5897f775 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp_usrreq.c,v 1.146 2012/03/17 10:16:41 dlg Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.147 2012/04/04 04:31:38 yasuoka Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
@@ -1197,6 +1197,12 @@ udp_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *addr,
#ifdef PIPEX
if (inp->inp_pipex) {
struct pipex_session *session;
+
+ if (addr != NULL)
+ session =
+ pipex_l2tp_userland_lookup_session(m,
+ mtod(addr, struct sockaddr *));
+ else
#ifdef INET6
if (inp->inp_flags & INP_IPV6)
session =