summaryrefslogtreecommitdiff
path: root/print-tcp.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2019-03-07 22:20:34 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2019-03-08 10:12:21 +0100
commit9be45b2369666607980451d0c85b6fc62d529189 (patch)
tree17b2e669a9d6922ea1fb58eabeefc39d179328fe /print-tcp.c
parente85072ad1d966b1fa4c9a791debf9c5f02e416a9 (diff)
downloadtcpdump-9be45b2369666607980451d0c85b6fc62d529189.tar.gz
Use the ndo->ndo_protocol field instead of the protoname parameter
Moreover: Fix a truncated string: "[!" is not the prefix for a truncated string. Add two comments. Clean up a whitespace.
Diffstat (limited to 'print-tcp.c')
-rw-r--r--print-tcp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/print-tcp.c b/print-tcp.c
index 55bff766..66834e84 100644
--- a/print-tcp.c
+++ b/print-tcp.c
@@ -709,7 +709,8 @@ tcp_print(netdissect_options *ndo,
smtp_print(ndo, bp, length);
} else if (IS_SRC_OR_DST_PORT(WHOIS_PORT)) {
ND_PRINT(": ");
- txtproto_print(ndo, bp, length, "whois", NULL, 0); /* RFC 3912 */
+ ndo->ndo_protocol = "whois"; /* needed by txtproto_print() */
+ txtproto_print(ndo, bp, length, NULL, 0); /* RFC 3912 */
} else if (IS_SRC_OR_DST_PORT(BGP_PORT))
bgp_print(ndo, bp, length);
else if (IS_SRC_OR_DST_PORT(PPTP_PORT))
@@ -832,7 +833,7 @@ print_tcp_rst_data(netdissect_options *ndo,
c = EXTRACT_U_1(sp);
sp++;
fn_print_char(ndo, c);
- length--;
+ length--;
}
ND_PRINT("]");
}