Browse files

only NetBSD deals it as network byte order..

  • Loading branch information...
1 parent 9f3788a commit e74eb94df3c80cf62e1e874f59eb5f46fc7983e4 mitsuya committed Jan 27, 2006
Showing with 5 additions and 1 deletion.
  1. +5 −1 kame/sys/netinet/in_gif.c
View
6 kame/sys/netinet/in_gif.c
@@ -1,4 +1,4 @@
-/* $KAME: in_gif.c,v 1.98 2006/01/27 07:00:42 mitsuya Exp $ */
+/* $KAME: in_gif.c,v 1.99 2006/01/27 08:00:03 mitsuya Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -301,7 +301,11 @@ in_gif_output(ifp, family, m)
iphdr.ip_p = proto;
/* version will be set in ip_output() */
iphdr.ip_ttl = ip_gif_ttl;
+#ifdef __NetBSD__
iphdr.ip_len = htons(m->m_pkthdr.len + sizeof(struct ip));
+#else
+ iphdr.ip_len = m->m_pkthdr.len + sizeof(struct ip);
+#endif
ip_ecn_ingress((ifp->if_flags & IFF_LINK1) ? ECN_ALLOWED : ECN_NOCARE,
&iphdr.ip_tos, &tos);

0 comments on commit e74eb94

Please sign in to comment.