From a8c33a5850cd9d2f39e56c06b645c283225d78c4 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 24 Dec 2019 17:47:23 -0800 Subject: The third argument to linkaddr_string is one of the LINKADDR_ enums. It's *not* just a number like 0. That *happens* to work, because, even though LINKADDR_ETHER is currently 0, linkaddr_string() handles link addresses of type LINKADDR_ETHER with a length other than 6 octets as just a collection of octets, but we shouldn't *rely* on that. --- print-geonet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'print-geonet.c') diff --git a/print-geonet.c b/print-geonet.c index 7ede5f3e..67945800 100644 --- a/print-geonet.c +++ b/print-geonet.c @@ -89,7 +89,7 @@ print_long_pos_vector(netdissect_options *ndo, uint32_t lat, lon; ND_TCHECK_LEN(bp, GEONET_ADDR_LEN); - ND_PRINT("GN_ADDR:%s ", linkaddr_string (ndo, bp, 0, GEONET_ADDR_LEN)); + ND_PRINT("GN_ADDR:%s ", linkaddr_string (ndo, bp, LINKADDR_OTHER, GEONET_ADDR_LEN)); ND_TCHECK_8(bp + 12); lat = GET_BE_U_4(bp + 12); -- cgit v1.2.1