]> The Tcpdump Group git mirrors - tcpdump/commitdiff
SUNRPC: Use GET_IPADDR_STRING()/GET_IP6ADDR_STRING() calls
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 23 Sep 2020 18:06:21 +0000 (20:06 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 23 Sep 2020 18:07:01 +0000 (20:07 +0200)
Replace the calls to ipaddr_string()/ip6addr_string() with calls to
GET_IPADDR_STRING()/GET_IP6ADDR_STRING() macros performing bounds
checking.

print-sunrpc.c

index 94b867075b543d6ef7ca4a37a4270efbae6f2536..651963ce6767b08f2299188d661039c8cd23d2ef 100644 (file)
@@ -185,14 +185,14 @@ sunrpc_print(netdissect_options *ndo, const u_char *bp,
        case 4:
                ip = (const struct ip *)bp2;
                ND_PRINT("%s.%s > %s.%s: %u",
-                   ipaddr_string(ndo, ip->ip_src), srcid,
-                   ipaddr_string(ndo, ip->ip_dst), dstid, length);
+                   GET_IPADDR_STRING(ip->ip_src), srcid,
+                   GET_IPADDR_STRING(ip->ip_dst), dstid, length);
                break;
        case 6:
                ip6 = (const struct ip6_hdr *)bp2;
                ND_PRINT("%s.%s > %s.%s: %u",
-                   ip6addr_string(ndo, ip6->ip6_src), srcid,
-                   ip6addr_string(ndo, ip6->ip6_dst), dstid, length);
+                   GET_IP6ADDR_STRING(ip6->ip6_src), srcid,
+                   GET_IP6ADDR_STRING(ip6->ip6_dst), dstid, length);
                break;
        default:
                ND_PRINT("%s.%s > %s.%s: %u", "?", srcid, "?", dstid, length);