Module Name:    src
Committed By:   knakahara
Date:           Thu Mar 30 23:13:54 UTC 2017

Modified Files:
        src/sys/netinet: in_l2tp.c
        src/sys/netinet6: in6_l2tp.c

Log Message:
remove duplicated validation. That is already done in l2tp_lookup_session_ref().

pointed out by s-yamaguchi@IIJ, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/netinet/in_l2tp.c
cvs rdiff -u -r1.1 -r1.2 src/sys/netinet6/in6_l2tp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/in_l2tp.c
diff -u src/sys/netinet/in_l2tp.c:1.1 src/sys/netinet/in_l2tp.c:1.2
--- src/sys/netinet/in_l2tp.c:1.1	Thu Feb 16 08:23:35 2017
+++ src/sys/netinet/in_l2tp.c	Thu Mar 30 23:13:54 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: in_l2tp.c,v 1.1 2017/02/16 08:23:35 knakahara Exp $	*/
+/*	$NetBSD: in_l2tp.c,v 1.2 2017/03/30 23:13:54 knakahara Exp $	*/
 
 /*
  * Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in_l2tp.c,v 1.1 2017/02/16 08:23:35 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in_l2tp.c,v 1.2 2017/03/30 23:13:54 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_l2tp.h"
@@ -315,11 +315,6 @@ in_l2tp_input(struct mbuf *m, int off, i
 		goto out;
 	}
 
-	if (sess_id != var->lv_my_sess_id) {
-		m_freem(m);
-		goto out;
-	}
-
 	m_adj(m, off + sizeof(uint32_t));
 
 	if (var->lv_use_cookie == L2TP_COOKIE_ON) {

Index: src/sys/netinet6/in6_l2tp.c
diff -u src/sys/netinet6/in6_l2tp.c:1.1 src/sys/netinet6/in6_l2tp.c:1.2
--- src/sys/netinet6/in6_l2tp.c:1.1	Thu Feb 16 08:23:36 2017
+++ src/sys/netinet6/in6_l2tp.c	Thu Mar 30 23:13:54 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_l2tp.c,v 1.1 2017/02/16 08:23:36 knakahara Exp $	*/
+/*	$NetBSD: in6_l2tp.c,v 1.2 2017/03/30 23:13:54 knakahara Exp $	*/
 
 /*
  * Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6_l2tp.c,v 1.1 2017/02/16 08:23:36 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_l2tp.c,v 1.2 2017/03/30 23:13:54 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_l2tp.h"
@@ -309,12 +309,6 @@ in6_l2tp_input(struct mbuf **mp, int *of
 		m_freem(m);
 		goto out;
 	}
-
-	if (sess_id != var->lv_my_sess_id) {
-		m_freem(m);
-		goto out;
-	}
-
 	m_adj(m, off + sizeof(uint32_t));
 
 	if (var->lv_use_cookie == L2TP_COOKIE_ON) {

Reply via email to