Module Name:    src
Committed By:   christos
Date:           Sun Apr  5 02:50:28 UTC 2020

Modified Files:
        src/sys/external/bsd/ipf/netinet: fil.c

Log Message:
PR/55137: Kouichi Hashikawa: ipfstat -f incorrect output
Fix incorrect byte order.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/external/bsd/ipf/netinet/fil.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/external/bsd/ipf/netinet/fil.c
diff -u src/sys/external/bsd/ipf/netinet/fil.c:1.31 src/sys/external/bsd/ipf/netinet/fil.c:1.32
--- src/sys/external/bsd/ipf/netinet/fil.c:1.31	Mon Sep 30 12:58:06 2019
+++ src/sys/external/bsd/ipf/netinet/fil.c	Sat Apr  4 22:50:27 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: fil.c,v 1.31 2019/09/30 16:58:06 bouyer Exp $	*/
+/*	$NetBSD: fil.c,v 1.32 2020/04/05 02:50:27 christos Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -141,7 +141,7 @@ extern struct timeout ipf_slowtimer_ch;
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.31 2019/09/30 16:58:06 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.32 2020/04/05 02:50:27 christos Exp $");
 #else
 static const char sccsid[] = "@(#)fil.c	1.36 6/5/96 (C) 1993-2000 Darren Reed";
 static const char rcsid[] = "@(#)Id: fil.c,v 1.1.1.2 2012/07/22 13:45:07 darrenr Exp $";
@@ -1696,7 +1696,7 @@ ipf_pr_ipv4hdr(fr_info_t *fin)
 	fi->fi_p = p;
 	fin->fin_crc = p;
 	fi->fi_tos = ip->ip_tos;
-	fin->fin_id = ip->ip_id;
+	fin->fin_id = ntohs(ip->ip_id);
 	off = ntohs(ip->ip_off);
 
 	/* Get both TTL and protocol */

Reply via email to