OpenSDE Packages Database (without history before r20070)
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.

116 lines
3.9 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../ebtables/gcc4.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. diff -Nur ebtables-v2.0.6.orig/extensions/ebt_ip.c ebtables-v2.0.6/extensions/ebt_ip.c
  17. --- ebtables-v2.0.6.orig/extensions/ebt_ip.c 2003-11-02 20:22:56.000000000 +0200
  18. +++ ebtables-v2.0.6/extensions/ebt_ip.c 2005-11-01 18:48:56.000000000 +0200
  19. @@ -244,6 +244,7 @@
  20. struct ebt_ip_info *ipinfo = (struct ebt_ip_info *)(*match)->data;
  21. char *end;
  22. long int i;
  23. + unsigned char j;
  24. switch (c) {
  25. case IP_SOURCE:
  26. @@ -313,7 +314,7 @@
  27. ipinfo->invflags |= EBT_IP_PROTO;
  28. if (optind > argc)
  29. print_error("Missing IP protocol argument");
  30. - (unsigned char) i = strtoul(argv[optind - 1], &end, 10);
  31. + j = strtoul(argv[optind - 1], &end, 10);
  32. if (*end != '\0') {
  33. struct protoent *pe;
  34. @@ -324,7 +325,7 @@
  35. argv[optind - 1]);
  36. ipinfo->protocol = pe->p_proto;
  37. } else {
  38. - ipinfo->protocol = (unsigned char) i;
  39. + ipinfo->protocol = j;
  40. }
  41. ipinfo->bitmask |= EBT_IP_PROTO;
  42. break;
  43. diff -Nur ebtables-v2.0.6.orig/extensions/ebt_limit.c ebtables-v2.0.6/extensions/ebt_limit.c
  44. --- ebtables-v2.0.6.orig/extensions/ebt_limit.c 2003-11-02 20:22:56.000000000 +0200
  45. +++ ebtables-v2.0.6/extensions/ebt_limit.c 2005-11-01 18:48:56.000000000 +0200
  46. @@ -203,15 +203,15 @@
  47. static struct ebt_u_match limit_match =
  48. {
  49. - .name EBT_LIMIT_MATCH,
  50. - .size sizeof(struct ebt_limit_info),
  51. - .help print_help,
  52. - .init init,
  53. - .parse parse,
  54. - .final_check final_check,
  55. - .print print,
  56. - .compare compare,
  57. - .extra_ops opts,
  58. + .name = EBT_LIMIT_MATCH,
  59. + .size = sizeof(struct ebt_limit_info),
  60. + .help = print_help,
  61. + .init = init,
  62. + .parse = parse,
  63. + .final_check = final_check,
  64. + .print = print,
  65. + .compare = compare,
  66. + .extra_ops = opts,
  67. };
  68. static void _init(void) __attribute((constructor));
  69. diff -Nur ebtables-v2.0.6.orig/extensions/ebt_vlan.c ebtables-v2.0.6/extensions/ebt_vlan.c
  70. --- ebtables-v2.0.6.orig/extensions/ebt_vlan.c 2003-11-02 20:22:56.000000000 +0200
  71. +++ ebtables-v2.0.6/extensions/ebt_vlan.c 2005-11-01 18:48:56.000000000 +0200
  72. @@ -135,14 +135,16 @@
  73. (struct ebt_vlan_info *) (*match)->data;
  74. char *end;
  75. struct ebt_vlan_info local;
  76. + unsigned short id, encap;
  77. + unsigned char prio;
  78. switch (c) {
  79. case VLAN_ID:
  80. check_option(flags, OPT_VLAN_ID);
  81. CHECK_INV_FLAG(EBT_VLAN_ID);
  82. CHECK_IF_MISSING_VALUE;
  83. - (unsigned short) local.id =
  84. - strtoul(argv[optind - 1], &end, 10);
  85. + id = strtoul(argv[optind - 1], &end, 10);
  86. + local.id = (uint16_t) id;
  87. CHECK_RANGE(local.id > 4094 || *end != '\0');
  88. vlaninfo->id = local.id;
  89. SET_BITMASK(EBT_VLAN_ID);
  90. @@ -152,8 +154,8 @@
  91. check_option(flags, OPT_VLAN_PRIO);
  92. CHECK_INV_FLAG(EBT_VLAN_PRIO);
  93. CHECK_IF_MISSING_VALUE;
  94. - (unsigned char) local.prio =
  95. - strtoul(argv[optind - 1], &end, 10);
  96. + prio = strtoul(argv[optind - 1], &end, 10);
  97. + local.prio = (uint8_t) prio;
  98. CHECK_RANGE(local.prio >= 8 || *end != '\0');
  99. vlaninfo->prio = local.prio;
  100. SET_BITMASK(EBT_VLAN_PRIO);
  101. @@ -163,8 +165,8 @@
  102. check_option(flags, OPT_VLAN_ENCAP);
  103. CHECK_INV_FLAG(EBT_VLAN_ENCAP);
  104. CHECK_IF_MISSING_VALUE;
  105. - (unsigned short) local.encap =
  106. - strtoul(argv[optind - 1], &end, 16);
  107. + encap = strtoul(argv[optind - 1], &end, 16);
  108. + local.encap = (uint16_t) encap;
  109. if (*end != '\0') {
  110. ethent = getethertypebyname(argv[optind - 1]);
  111. if (ethent == NULL)