summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-08-26 17:39:35 +0000
committerbrian <brian@FreeBSD.org>1998-08-26 17:39:35 +0000
commit307727cd4cb34041ce7fbca4c3323678d1dd9f0c (patch)
tree8e7991e167fb150272e6f14cbac915754c31141c
parent2bc99e9f6bdedfd8f70734259b952ed761c78363 (diff)
downloadFreeBSD-src-307727cd4cb34041ce7fbca4c3323678d1dd9f0c.zip
FreeBSD-src-307727cd4cb34041ce7fbca4c3323678d1dd9f0c.tar.gz
The protocol must be in network byte order (OpenBSD only).
-rw-r--r--usr.sbin/ppp/tun.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ppp/tun.h b/usr.sbin/ppp/tun.h
index 0ed879f..b66987d 100644
--- a/usr.sbin/ppp/tun.h
+++ b/usr.sbin/ppp/tun.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: tun.h,v 1.4 1998/05/21 21:48:55 brian Exp $
+ * $Id: tun.h,v 1.5 1998/06/27 12:03:43 brian Exp $
*/
struct tun_data {
@@ -34,8 +34,8 @@ struct tun_data {
};
#ifdef __OpenBSD__
-#define tun_fill_header(f,proto) do { (f).head = (proto); } while (0)
-#define tun_check_header(f,proto) ((f).head == (proto))
+#define tun_fill_header(f,proto) do { (f).head = htonl(proto); } while (0)
+#define tun_check_header(f,proto) ((f).head == htonl(proto))
#else
#define tun_fill_header(f,proto) do { } while (0)
#define tun_check_header(f,proto) (1)
OpenPOWER on IntegriCloud