From d6bdc48e894887b55905bd05c8e44f5716d8d508 Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Fri, 28 Sep 2012 16:06:21 +0000 Subject: free the control message in udp_input() if the packet is passed to pipex ok yasuoka@ --- sys/netinet/udp_usrreq.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/netinet/udp_usrreq.c') diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 48700af5473..82f0eef86c9 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udp_usrreq.c,v 1.150 2012/09/17 20:01:26 yasuoka Exp $ */ +/* $OpenBSD: udp_usrreq.c,v 1.151 2012/09/28 16:06:20 markus Exp $ */ /* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */ /* @@ -722,8 +722,11 @@ udp_input(struct mbuf *m, ...) int off = iphlen + sizeof(struct udphdr); if ((session = pipex_l2tp_lookup_session(m, off)) != NULL) { if ((m = pipex_l2tp_input(m, off, session, - ipsecflowinfo)) == NULL) + ipsecflowinfo)) == NULL) { + if (opts) + m_freem(opts); return; /* the packet is handled by PIPEX */ + } } } #endif -- cgit v1.2.3