patch-src_packet_c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- iptraf-3.0.0.orig/src/packet.c 2005-09-13 08:42:54.000000000 +0200
  3. +++ iptraf-3.0.0/src/packet.c 2009-05-21 23:03:57.000000000 +0200
  4. @@ -35,7 +35,6 @@ details.
  5. #include <sys/ioctl.h>
  6. #include <linux/if_packet.h>
  7. #include <linux/if_ether.h>
  8. -#include <linux/if_fddi.h>
  9. #include <linux/if_tr.h>
  10. #include <linux/isdn.h>
  11. #include <linux/sockios.h>
  12. @@ -81,8 +80,6 @@ unsigned short getlinktype(unsigned shor
  13. result = LINK_ETHERNET;
  14. else if (strncmp(ifname, "plip", 4) == 0)
  15. result = LINK_PLIP;
  16. - else if (strncmp(ifname, "fddi", 4) == 0) /* For some Ethernet- */
  17. - result = LINK_ETHERNET; /* emulated FDDI ifaces */
  18. else if (strncmp(ifname, "dvb", 3) == 0)
  19. result = LINK_ETHERNET;
  20. else if (strncmp(ifname, "sbni", 4) == 0)
  21. @@ -136,9 +133,6 @@ unsigned short getlinktype(unsigned shor
  22. case ARPHRD_PPP:
  23. result = LINK_PPP;
  24. break;
  25. - case ARPHRD_FDDI:
  26. - result = LINK_FDDI;
  27. - break;
  28. case ARPHRD_IEEE802:
  29. case ARPHRD_IEEE802_TR:
  30. result = LINK_TR;
  31. @@ -194,19 +188,6 @@ void adjustpacket(char *tpacket, unsigne
  32. *packet = tpacket + 4;
  33. *readlen -= 4;
  34. break;
  35. - case LINK_FDDI:
  36. - *packet = tpacket + sizeof(struct fddihdr);
  37. - *readlen -= sizeof(struct fddihdr);
  38. -
  39. - /*
  40. - * Move IP data into an aligned buffer. 96 bytes should be sufficient
  41. - * for IP and TCP headers with reasonable numbers of options and some
  42. - * data.
  43. - */
  44. -
  45. - memmove(aligned_buf, *packet, min(SNAPSHOT_LEN, *readlen));
  46. - *packet = aligned_buf;
  47. - break;
  48. case LINK_TR:
  49. /*
  50. * Token Ring patch supplied by Tomas Dvorak
  51. @@ -337,7 +318,7 @@ int processpacket(char *tpacket, char **
  52. * Prepare ISDN reference descriptor and table.
  53. */
  54. - bzero(&isdntable, sizeof(struct isdntab));
  55. + memset(&isdntable, 0, sizeof(struct isdntab));
  56. isdn_iface_check(&isdnfd, ifname);
  57. /*