Commit 32717693 authored by Martina Ferrari's avatar Martina Ferrari

Remove unused and ancient patch.

parent 82b53c56
Description: Implement wide printing for UDP and RAW.
Said protocols did not see the intended modifications
that allows long addresses printed in full.
Author: Mats Erik Andersson <mats.andersson@gisladisker.se>
Bug-Debian: http://bugs.debian.org/632660
Index: net-tools/netstat.c
===================================================================
--- net-tools.orig/netstat.c
+++ net-tools/netstat.c
@@ -922,8 +922,10 @@ static void udp_do_one(int lnr, const ch
snprintf(buffer, sizeof(buffer), "%s",
get_sname(htons(local_port), "udp",
flag_not & FLAG_NUM_PORT));
- if ((strlen(local_addr) + strlen(buffer)) > 22)
- local_addr[22 - strlen(buffer)] = '\0';
+ if (!flag_wide) {
+ if ((strlen(local_addr) + strlen(buffer)) > 22)
+ local_addr[22 - strlen(buffer)] = '\0';
+ }
strcat(local_addr, ":");
strcat(local_addr, buffer);
@@ -931,8 +933,10 @@ static void udp_do_one(int lnr, const ch
get_sname(htons(rem_port), "udp", flag_not & FLAG_NUM_PORT));
safe_strncpy(rem_addr, ap->sprint((struct sockaddr *) &remaddr,
flag_not), sizeof(rem_addr));
- if ((strlen(rem_addr) + strlen(buffer)) > 22)
- rem_addr[22 - strlen(buffer)] = '\0';
+ if (!flag_wide) {
+ if ((strlen(rem_addr) + strlen(buffer)) > 22)
+ rem_addr[22 - strlen(buffer)] = '\0';
+ }
strcat(rem_addr, ":");
strcat(rem_addr, buffer);
@@ -1041,8 +1045,10 @@ static void raw_do_one(int lnr, const ch
flag_not & FLAG_NUM_PORT));
safe_strncpy(local_addr, ap->sprint((struct sockaddr *) &localaddr,
flag_not), sizeof(local_addr));
- if ((strlen(local_addr) + strlen(buffer)) > 22)
- local_addr[22 - strlen(buffer)] = '\0';
+ if (!flag_wide) {
+ if ((strlen(local_addr) + strlen(buffer)) > 22)
+ local_addr[22 - strlen(buffer)] = '\0';
+ }
strcat(local_addr, ":");
strcat(local_addr, buffer);
@@ -1050,8 +1056,10 @@ static void raw_do_one(int lnr, const ch
get_sname(htons(rem_port), "raw", flag_not & FLAG_NUM_PORT));
safe_strncpy(rem_addr, ap->sprint((struct sockaddr *) &remaddr,
flag_not), sizeof(rem_addr));
- if ((strlen(rem_addr) + strlen(buffer)) > 22)
- rem_addr[22 - strlen(buffer)] = '\0';
+ if (!flag_wide) {
+ if ((strlen(rem_addr) + strlen(buffer)) > 22)
+ rem_addr[22 - strlen(buffer)] = '\0';
+ }
strcat(rem_addr, ":");
strcat(rem_addr, buffer);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment