From: sthen Date: Thu, 18 Nov 2021 11:04:10 +0000 (+0000) Subject: printing udpencap_port in ddb requires ntohs not ntohl. use better format X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fdab00c07a580b7d9dd5f19fd92b78680aa48763;p=openbsd printing udpencap_port in ddb requires ntohs not ntohl. use better format string. help claudio@ ok bluhm@ --- diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c index c516964f429..f1941ac645f 100644 --- a/sys/netinet/ip_ipsp.c +++ b/sys/netinet/ip_ipsp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipsp.c,v 1.250 2021/11/16 13:53:14 bluhm Exp $ */ +/* $OpenBSD: ip_ipsp.c,v 1.251 2021/11/18 11:04:10 sthen Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr), @@ -591,8 +591,8 @@ tdb_printit(void *addr, int full, int (*pr)(const char *, ...)) DUMP(ids_swapped, "%d"); DUMP(mtu, "%d"); DUMP(mtutimeout, "%lld"); - pr("%18s: %08x\n", "udpencap_port", - ntohl(tdb->tdb_udpencap_port)); + pr("%18s: %d\n", "udpencap_port", + ntohs(tdb->tdb_udpencap_port)); DUMP(tag, "%d"); DUMP(tap, "%d"); DUMP(rdomain, "%d");