Blame SOURCES/net-tools-interface-name-len.patch

1c4448
diff --git a/netstat.c b/netstat.c
1c4448
index c084dfb..cfcfb78 100644
1c4448
--- a/netstat.c
1c4448
+++ b/netstat.c
1c4448
@@ -743,6 +743,7 @@ static void igmp_do_one(int lnr, const char *line,const char *prot)
1c4448
     static int igmp6_flag = 0;
1c4448
     static char device[16];
1c4448
     int num, idx, refcnt;
1c4448
+    char* offset;
1c4448
 
1c4448
     if (lnr == 0) {
1c4448
 	/* IPV6 ONLY */
1c4448
@@ -794,17 +795,21 @@ static void igmp_do_one(int lnr, const char *line,const char *prot)
1c4448
 #if HAVE_AFINET
1c4448
 	if (line[0] != '\t') {
1c4448
 	    if (idx_flag) {
1c4448
-		if ((num = sscanf( line, "%d\t%10c", &idx, device)) < 2) {
1c4448
+		if ((num = sscanf( line, "%d\t%15c", &idx, device)) < 2) {
1c4448
 		    fprintf(stderr, _("warning, got bogus igmp line %d.\n"), lnr);
1c4448
 		    return;
1c4448
 		}
1c4448
 	    } else {
1c4448
-		if ( (num = sscanf( line, "%10c", device )) < 1 ) {
1c4448
+		if ( (num = sscanf( line, "%15c", device )) < 1 ) {
1c4448
 		    fprintf(stderr, _("warning, got bogus igmp line %d.\n"), lnr);
1c4448
 		    return;
1c4448
 		}
1c4448
 	    }
1c4448
-	    device[10] = '\0';
1c4448
+
1c4448
+	    offset = strrchr(device, ':');
1c4448
+	    if(offset)
1c4448
+		*offset = 0;
1c4448
+
1c4448
 	    return;
1c4448
 	} else if ( line[0] == '\t' ) {
1c4448
 	    if ( (num = sscanf(line, "\t%8[0-9A-Fa-f] %d", mcast_addr, &refcnt)) < 2 ) {
1c4448
@@ -2037,7 +2037,7 @@ static int iface_info(void)
1c4448
     if (flag_exp < 2) {
1c4448
 	ife_short = 1;
1c4448
 	if(!(count % 8))
1c4448
-	    printf(_("Iface      MTU    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
1c4448
+	    printf(_("Iface             MTU    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
1c4448
     }
1c4448
1c4448
     if (flag_int_name) {
1c4448
diff --git a/lib/interface.c b/lib/interface.c
1c4448
index 3bd999f..97f3db5 100644
1c4448
--- a/lib/interface.c
1c4448
+++ b/lib/interface.c
1c4448
@@ -655,7 +655,7 @@ int do_if_print(struct interface *ife, void *cookie)
1c4448
 
1c4448
 void ife_print_short(struct interface *ptr)
1c4448
 {
1c4448
-    printf("%-8.8s ", ptr->name);
1c4448
+    printf("%-15.15s ", ptr->name);
1c4448
     printf("%5d ", ptr->mtu);
1c4448
     /* If needed, display the interface statistics. */
1c4448
     if (ptr->statistics_valid) {