On Wed, 14 Apr 2021 17:42:57 +0200 Alexander Bluhm <alexander.bl...@gmx.net> wrote:
> Hi, > > regress/sys/net/wg fails on powerpc64 as tcpdump(8) cannot parse > wireguard packets. EXTRACT_LE_32BITS() converts the type from > little endian to host endian. So we need the constants in host > endianess. > > ok? Makes sense. I haven't tested on my side, but it reads OK. > bluhm > > Index: print-wg.c > =================================================================== > RCS file: /mount/openbsd/cvs/src/usr.sbin/tcpdump/print-wg.c,v > retrieving revision 1.5 > diff -u -p -r1.5 print-wg.c > --- print-wg.c 20 Jul 2020 02:24:24 -0000 1.5 > +++ print-wg.c 14 Apr 2021 15:35:19 -0000 > @@ -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; >