iproute2-xt-v6.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From: Andreas Henriksson <andreas@fatal.se>
  2. Forwarded: yes
  3. Subject: [PATCH] iproute2: Fix building xt module against xtables version 6
  4. diff --git a/tc/m_xt.c b/tc/m_xt.c
  5. index 651a59e..13bf19f 100644
  6. --- a/tc/m_xt.c
  7. +++ b/tc/m_xt.c
  8. @@ -160,9 +160,13 @@ static int parse_ipt(struct action_util *a,int *argc_p,
  9. return -1;
  10. }
  11. tcipt_globals.opts =
  12. - xtables_merge_options(tcipt_globals.opts,
  13. - m->extra_opts,
  14. - &m->option_offset);
  15. + xtables_merge_options(
  16. +#if (XTABLES_VERSION_CODE >= 6)
  17. + tcipt_globals.orig_opts,
  18. +#endif
  19. + tcipt_globals.opts,
  20. + m->extra_opts,
  21. + &m->option_offset);
  22. } else {
  23. fprintf(stderr," failed to find target %s\n\n", optarg);
  24. return -1;
  25. @@ -305,7 +309,11 @@ print_ipt(struct action_util *au,FILE * f, struct rtattr *arg)
  26. }
  27. tcipt_globals.opts =
  28. - xtables_merge_options(tcipt_globals.opts,
  29. + xtables_merge_options(
  30. +#if (XTABLES_VERSION_CODE >= 6)
  31. + tcipt_globals.orig_opts,
  32. +#endif
  33. + tcipt_globals.opts,
  34. m->extra_opts,
  35. &m->option_offset);
  36. } else {