summaryrefslogtreecommitdiffstats
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
authoryasuoka <yasuoka@openbsd.org>2012-04-04 04:31:38 +0000
committeryasuoka <yasuoka@openbsd.org>2012-04-04 04:31:38 +0000
commit7b163281ec954475c36facfd231c6deecc4754c7 (patch)
tree0a433153b394072c24199ee052a8fbcb8e45db9d /sys/netinet/udp_usrreq.c
parentAfter suspend/resume, reload the firmware. Skip firmware on (diff)
downloadwireguard-openbsd-7b163281ec954475c36facfd231c6deecc4754c7.tar.xz
wireguard-openbsd-7b163281ec954475c36facfd231c6deecc4754c7.zip
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 =