]> The Tcpdump Group git mirrors - tcpdump/commitdiff
DCCP: Use GET_IPADDR_STRING()/GET_IP6ADDR_STRING() calls
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 23 Sep 2020 14:46:30 +0000 (16:46 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 23 Sep 2020 15:33:30 +0000 (17:33 +0200)
Replace the calls to ipaddr_string()/ip6addr_string() with calls to
GET_IPADDR_STRING()/GET_IP6ADDR_STRING() macros performing bounds
checking.

print-dccp.c

index 8766f4432c8b32c08dda1f4a3b35530c5a011496..cb287f909193e5fb6c6bdfa15be4500f8fedd71d 100644 (file)
@@ -315,12 +315,12 @@ dccp_print(netdissect_options *ndo, const u_char *bp, const u_char *data2,
 
        if (ip6) {
                ND_PRINT("%s.%u > %s.%u: ",
-                         ip6addr_string(ndo, ip6->ip6_src), sport,
-                         ip6addr_string(ndo, ip6->ip6_dst), dport);
+                         GET_IP6ADDR_STRING(ip6->ip6_src), sport,
+                         GET_IP6ADDR_STRING(ip6->ip6_dst), dport);
        } else {
                ND_PRINT("%s.%u > %s.%u: ",
-                         ipaddr_string(ndo, ip->ip_src), sport,
-                         ipaddr_string(ndo, ip->ip_dst), dport);
+                         GET_IPADDR_STRING(ip->ip_src), sport,
+                         GET_IPADDR_STRING(ip->ip_dst), dport);
        }
 
        nd_print_protocol_caps(ndo);