comment out confusing (and incorrect) code and add comment. Pointed out by maxv@n.o, thanks.

This commit is contained in:
knakahara 2018-03-13 03:05:12 +00:00
parent f0a3006c1d
commit e7acdb682b
1 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipsecif.c,v 1.4 2018/03/09 11:05:21 knakahara Exp $ */
/* $NetBSD: ipsecif.c,v 1.5 2018/03/13 03:05:12 knakahara Exp $ */
/*
* Copyright (c) 2017 Internet Initiative Japan Inc.
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ipsecif.c,v 1.4 2018/03/09 11:05:21 knakahara Exp $");
__KERNEL_RCSID(0, "$NetBSD: ipsecif.c,v 1.5 2018/03/13 03:05:12 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -483,7 +483,9 @@ ipsecif6_output(struct ipsec_variant *var, int family, struct mbuf *m)
ip6->ip6_flow = 0;
ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
ip6->ip6_vfc |= IPV6_VERSION;
ip6->ip6_plen = htons((u_short)m->m_pkthdr.len);
#if 0 /* ip6->ip6_plen will be filled by ip6_output */
ip6->ip6_plen = htons((u_short)m->m_pkthdr.len - sizeof(*ip6));
#endif
ip6->ip6_nxt = proto;
ip6->ip6_hlim = ip6_ipsec_hlim;
ip6->ip6_src = sin6_src->sin6_addr;