]> git.pld-linux.org Git - packages/tcpdump.git/commitdiff
- fixes from rawhide.
authorkloczek <kloczek@pld-linux.org>
Sat, 27 Nov 1999 07:48:52 +0000 (07:48 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    tcpdump-iphl.patch -> 1.1
    tcpdump-sparc64.patch -> 1.1

tcpdump-iphl.patch [new file with mode: 0644]
tcpdump-sparc64.patch [new file with mode: 0644]

diff --git a/tcpdump-iphl.patch b/tcpdump-iphl.patch
new file mode 100644 (file)
index 0000000..52790d6
--- /dev/null
@@ -0,0 +1,13 @@
+--- tcpdump-3.4/print-ip.c.iphl        Fri Aug 20 17:37:59 1999
++++ tcpdump-3.4/print-ip.c     Fri Aug 20 17:39:05 1999
+@@ -463,6 +463,10 @@
+                       (void)printf("truncated-ip %d", length);
+               return;
+       }
++      if (ip->ip_hl < 5) {
++              (void)printf("ip_hl < 5 (%d)", ip->ip_hl);
++              return;
++      }
+       hlen = ip->ip_hl * 4;
+       len = ntohs(ip->ip_len);
diff --git a/tcpdump-sparc64.patch b/tcpdump-sparc64.patch
new file mode 100644 (file)
index 0000000..3f592e6
--- /dev/null
@@ -0,0 +1,38 @@
+--- tcpdump-3.4/print-ether.c.jbj      Tue Aug  3 19:45:06 1999
++++ tcpdump-3.4/print-ether.c  Wed Aug  4 09:08:36 1999
+@@ -54,6 +54,7 @@
+ #include <linux/if_packet.h>
+ #include <stdio.h>
++#include <ctype.h>
+ #include <pcap.h>
+ #include "interface.h"
+@@ -103,20 +104,23 @@
+               static char ifnames[16][16];
+               if (h->ifindex>0 && h->ifindex <= 16) {
+                       if (ifnames[h->ifindex-1][0] == 0) {
+-                              int tmp_fd;
++                              int tmp_fd, err;
+                               struct ifreq ifr;
+                               ifr.ifr_ifindex = h->ifindex;
+                               tmp_fd = socket(AF_INET, SOCK_DGRAM, 0);
+-                              if (ioctl(tmp_fd, SIOCGIFNAME, (char*)&ifr) == 0) {
++                              err = ioctl(tmp_fd, SIOCGIFNAME, (char*)&ifr);
++                      /* XXX SIOCGIFNAME fubar on sparc64 2.2.10-3 */
++                              if (err == 0 &&
++                                  (isprint(ifr.ifr_name[0]) && isprint(ifr.ifr_name[1]))) {
+                                       memcpy(ifnames[h->ifindex-1], ifr.ifr_name, 16);
+                               } else {
+-                                      sprintf(ifnames[h->ifindex-1], "if%2d ", h->ifindex);
++                                      sprintf(ifnames[h->ifindex-1], "if%02d ", h->ifindex);
+                               }
+                               close(tmp_fd);
+                       }
+                       printf("%4s ", ifnames[h->ifindex-1]);
+               } else
+-                      printf("if%2d ", h->ifindex);
++                      printf("if%02d ", h->ifindex);
+       }
+       switch (h->pkt_type) {
This page took 0.026549 seconds and 4 git commands to generate.