Source-Changes-HG archive

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

[src/trunk]: src/sys/net gi_len is ip_len, so it has to be network byteorder....



details:   https://anonhg.NetBSD.org/src/rev/6678385475b6
branches:  trunk
changeset: 556260:6678385475b6
user:      itojun <itojun%NetBSD.org@localhost>
date:      Thu Dec 11 00:22:29 2003 +0000

description:
gi_len is ip_len, so it has to be network byteorder.  markus friedl

diffstat:

 sys/net/if_gre.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 81159cc84f7a -r 6678385475b6 sys/net/if_gre.c
--- a/sys/net/if_gre.c  Wed Dec 10 23:46:42 2003 +0000
+++ b/sys/net/if_gre.c  Thu Dec 11 00:22:29 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_gre.c,v 1.48 2003/09/05 23:02:42 itojun Exp $ */
+/*     $NetBSD: if_gre.c,v 1.49 2003/12/11 00:22:29 itojun Exp $ */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.48 2003/09/05 23:02:42 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.49 2003/12/11 00:22:29 itojun Exp $");
 
 #include "opt_inet.h"
 #include "opt_ns.h"
@@ -330,7 +330,7 @@
                ((struct ip*)gh)->ip_hl = (sizeof(struct ip)) >> 2;
                ((struct ip*)gh)->ip_ttl = ip_gre_ttl;
                ((struct ip*)gh)->ip_tos = ip->ip_tos;
-               gh->gi_len = m->m_pkthdr.len;
+               gh->gi_len = htons(m->m_pkthdr.len);
        }
 
        ifp->if_opackets++;



Home | Main Index | Thread Index | Old Index