Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

src: Remove dead code.



details:   https://anonhg.NetBSD.org/src/rev/aeeabf0d7f9a
branches:  trunk
changeset: 318253:aeeabf0d7f9a
user:      maxv <maxv%NetBSD.org@localhost>
date:      Mon Apr 16 17:32:34 2018 +0000
description:
Remove dead code.

ok ozaki-r@

diffstat:

 sys/netipsec/xform_ah.c |  20 ++------------------
 1 files changed, 2 insertions(+), 18 deletions(-)

diffs (41 lines):

diff -r ec3b91078f31 -r aeeabf0d7f9a sys/netipsec/xform_ah.c
--- a/sys/netipsec/xform_ah.c   Mon Apr 16 16:11:40 2018 +0000
+++ b/sys/netipsec/xform_ah.c   Mon Apr 16 17:32:34 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xform_ah.c,v 1.88 2018/04/13 09:34:20 maxv Exp $       */
+/*     $NetBSD: xform_ah.c,v 1.89 2018/04/16 17:32:34 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.88 2018/04/13 09:34:20 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.89 2018/04/16 17:32:34 maxv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -299,22 +299,6 @@
                ip->ip_sum = 0;
                ip->ip_off = htons(ntohs(ip->ip_off) & ip4_ah_offsetmask);
 
-               /*
-                * On FreeBSD, ip_off and ip_len assumed in host endian;
-                * they are converted (if necessary) by ip_input().
-                * On NetBSD, ip_off and ip_len are in network byte order.
-                * They must be massaged back to network byte order
-                * before verifying the  HMAC. Moreover, on FreeBSD,
-                * we should add `skip' back into the massaged ip_len
-                * (presumably ip_input() deducted it before we got here?)
-                * 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



Home | Main Index | Thread Index | Old Index