From: bluhm Date: Wed, 14 Apr 2021 19:34:56 +0000 (+0000) Subject: On powerpc64 tcpdump(8) could not parse wireguard packets. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7c09302a71611d9c0eb9dbd19aa8b21c92a27224;p=openbsd On powerpc64 tcpdump(8) could not parse wireguard packets. EXTRACT_LE_32BITS() converts the type from little endian to host endian. So we need the constants in host endianess. This fixes regress/sys/net/wg. OK deraadt@ sthen@ --- diff --git a/usr.sbin/tcpdump/print-wg.c b/usr.sbin/tcpdump/print-wg.c index 70a61bd6ad4..4140b5ed8e9 100644 --- a/usr.sbin/tcpdump/print-wg.c +++ b/usr.sbin/tcpdump/print-wg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-wg.c,v 1.5 2020/07/20 02:24:24 kn Exp $ */ +/* $OpenBSD: print-wg.c,v 1.6 2021/04/14 19:34:56 bluhm Exp $ */ /* * Copyright (C) 2015-2020 Jason A. Donenfeld . All Rights Reserved. @@ -25,10 +25,10 @@ #include "interface.h" #include "extract.h" -#define INITIATION htole32(1) -#define RESPONSE htole32(2) -#define COOKIE htole32(3) -#define DATA htole32(4) +#define INITIATION 1 +#define RESPONSE 2 +#define COOKIE 3 +#define DATA 4 struct wg_initiation { uint32_t type;