patch-src_othptab_c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- iptraf-3.0.0.orig/src/othptab.c 2005-09-13 08:42:54.000000000 +0200
  3. +++ iptraf-3.0.0/src/othptab.c 2009-05-21 23:02:50.000000000 +0200
  4. @@ -17,13 +17,12 @@ details.
  5. ***/
  6. #include <asm/types.h>
  7. +#include "options.h"
  8. +#include "tcptable.h"
  9. #include <linux/if_ether.h>
  10. #include <linux/if_tr.h>
  11. -#include <linux/if_fddi.h>
  12. #include <winops.h>
  13. #include "arphdr.h"
  14. -#include "options.h"
  15. -#include "tcptable.h"
  16. #include "othptab.h"
  17. #include "deskman.h"
  18. #include "attrs.h"
  19. @@ -128,7 +127,7 @@ struct othptabent *add_othp_entry(struct
  20. *nomem = 1;
  21. return NULL;
  22. }
  23. - bzero(new_entry, sizeof(struct othptabent));
  24. + memset(new_entry, 0, sizeof(struct othptabent));
  25. new_entry->is_ip = is_ip;
  26. new_entry->fragment = fragment;
  27. @@ -139,11 +138,6 @@ struct othptabent *add_othp_entry(struct
  28. new_entry->smacaddr);
  29. convmacaddr(((struct ethhdr *) packet)->h_dest,
  30. new_entry->dmacaddr);
  31. - } else if (linkproto == LINK_FDDI) {
  32. - convmacaddr(((struct fddihdr *) packet)->saddr,
  33. - new_entry->smacaddr);
  34. - convmacaddr(((struct fddihdr *) packet)->daddr,
  35. - new_entry->dmacaddr);
  36. } else if (linkproto == LINK_TR) {
  37. convmacaddr(((struct trh_hdr *) packet)->saddr,
  38. new_entry->smacaddr);
  39. @@ -373,8 +367,7 @@ void printothpentry(struct othptable *ta
  40. strcat(msgstring, scratchpad);
  41. if ((entry->linkproto == LINK_ETHERNET) ||
  42. - (entry->linkproto == LINK_PLIP) ||
  43. - (entry->linkproto == LINK_FDDI)) {
  44. + (entry->linkproto == LINK_PLIP)) {
  45. sprintf(scratchpad, " from %s to %s on %s",
  46. entry->smacaddr, entry->dmacaddr, entry->iface);