From 3ea373e94d2c829a615b076e1bbc540ffbf7ac50 Mon Sep 17 00:00:00 2001 From: YASUOKA Masahiko Date: Wed, 4 Apr 2012 04:31:39 +0000 Subject: 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 --- sys/netinet/udp_usrreq.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sys/netinet/udp_usrreq.c') 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 = -- cgit v1.2.3