Module Name:    src
Committed By:   maxv
Date:           Fri Apr 13 09:34:20 UTC 2018

Modified Files:
        src/sys/netipsec: xform_ah.c

Log Message:
Remove duplicate, to better show that this place doesn't make a lot of
sense. The code should probably be removed, it's a leftover from when we
had #ifdef __FreeBSD__.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/netipsec/xform_ah.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/netipsec/xform_ah.c
diff -u src/sys/netipsec/xform_ah.c:1.87 src/sys/netipsec/xform_ah.c:1.88
--- src/sys/netipsec/xform_ah.c:1.87	Mon Feb 26 06:40:08 2018
+++ src/sys/netipsec/xform_ah.c	Fri Apr 13 09:34:20 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform_ah.c,v 1.87 2018/02/26 06:40:08 maxv Exp $	*/
+/*	$NetBSD: xform_ah.c,v 1.88 2018/04/13 09:34:20 maxv Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/xform_ah.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */
 /*
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.87 2018/02/26 06:40:08 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.88 2018/04/13 09:34:20 maxv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -310,21 +310,16 @@ ah_massage_headers(struct mbuf **m0, int
 		 * whereas on NetBSD, we should not.
 		 */
 		if (!out) {
+			/* XXX XXX: What are we trying to achieve here? */
 			uint16_t inlen = ntohs(ip->ip_len);
-
 			ip->ip_len = htons(inlen);
-
-			if (alg == CRYPTO_MD5_KPDK || alg == CRYPTO_SHA1_KPDK)
-				ip->ip_off  &= htons(IP_DF);
-			else
-				ip->ip_off = 0;
-		} else {
-			if (alg == CRYPTO_MD5_KPDK || alg == CRYPTO_SHA1_KPDK)
-				ip->ip_off &= htons(IP_DF);
-			else
-				ip->ip_off = 0;
 		}
 
+		if (alg == CRYPTO_MD5_KPDK || alg == CRYPTO_SHA1_KPDK)
+			ip->ip_off &= htons(IP_DF);
+		else
+			ip->ip_off = 0;
+
 		ptr = mtod(m, unsigned char *);
 
 		/* IPv4 option processing */

Reply via email to