You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.7 KiB

  1. From 6b09724c69d91668418ddb3af00da6db6755208c Mon Sep 17 00:00:00 2001
  2. From: Steve Grubb <sgrubb@redhat.com>
  3. Date: Thu, 2 Sep 2021 15:01:12 -0400
  4. Subject: [PATCH] Make IPX packet interpretation dependent on the ipx header
  5. file existing
  6. --- a/auparse/interpret.c
  7. +++ b/auparse/interpret.c
  8. @@ -44,8 +44,10 @@
  9. #include <linux/ax25.h>
  10. #include <linux/atm.h>
  11. #include <linux/x25.h>
  12. -#include <linux/if.h> // FIXME: remove when ipx.h is fixed
  13. -#include <linux/ipx.h>
  14. +#ifdef HAVE_IPX_HEADERS
  15. + #include <linux/if.h> // FIXME: remove when ipx.h is fixed
  16. + #include <linux/ipx.h>
  17. +#endif
  18. #include <linux/capability.h>
  19. #include <sys/personality.h>
  20. #include <sys/prctl.h>
  21. @@ -1158,6 +1160,7 @@ static const char *print_sockaddr(const
  22. x->sax25_call.ax25_call[6]);
  23. }
  24. break;
  25. +#ifdef HAVE_IPX_HEADERS
  26. case AF_IPX:
  27. {
  28. const struct sockaddr_ipx *ip =
  29. @@ -1167,6 +1170,7 @@ static const char *print_sockaddr(const
  30. str, ip->sipx_port, ip->sipx_network);
  31. }
  32. break;
  33. +#endif
  34. case AF_ATMPVC:
  35. {
  36. const struct sockaddr_atmpvc* at =
  37. --- a/configure.ac
  38. +++ b/configure.ac
  39. @@ -414,6 +414,12 @@ if test x"$LIBWRAP_LIBS" != "x"; then
  40. AC_DEFINE_UNQUOTED(HAVE_LIBWRAP, [], Define if tcp_wrappers support is enabled )
  41. fi
  42. +# linux/ipx.h - deprecated in 2018
  43. +AC_CHECK_HEADER(linux/ipx.h, ipx_headers=yes, ipx_headers=no)
  44. +if test $ipx_headers = yes ; then
  45. + AC_DEFINE(HAVE_IPX_HEADERS,1,[IPX packet interpretation])
  46. +fi
  47. +
  48. # See if we want to support lower capabilities for plugins
  49. LIBCAP_NG_PATH