Removed init script as there is an hotplug one, check whether user configuration...
[openwrt.git] / package / ebtables / patches / ebtables-2.0.6-gcc4.patch
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 - 2005 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
25 switch (c) {
26 case IP_SOURCE:
27 @@ -313,7 +314,7 @@
28 ipinfo->invflags |= EBT_IP_PROTO;
29 if (optind > argc)
30 print_error("Missing IP protocol argument");
31 - (unsigned char) i = strtoul(argv[optind - 1], &end, 10);
32 + j = strtoul(argv[optind - 1], &end, 10);
33 if (*end != '\0') {
34 struct protoent *pe;
35
36 @@ -324,7 +325,7 @@
37 argv[optind - 1]);
38 ipinfo->protocol = pe->p_proto;
39 } else {
40 - ipinfo->protocol = (unsigned char) i;
41 + ipinfo->protocol = j;
42 }
43 ipinfo->bitmask |= EBT_IP_PROTO;
44 break;
45 diff -Nur ebtables-v2.0.6.orig/extensions/ebt_limit.c ebtables-v2.0.6/extensions/ebt_limit.c
46 --- ebtables-v2.0.6.orig/extensions/ebt_limit.c 2003-11-02 20:22:56.000000000 +0200
47 +++ ebtables-v2.0.6/extensions/ebt_limit.c 2005-11-01 18:48:56.000000000 +0200
48 @@ -203,15 +203,15 @@
49
50 static struct ebt_u_match limit_match =
51 {
52 - .name EBT_LIMIT_MATCH,
53 - .size sizeof(struct ebt_limit_info),
54 - .help print_help,
55 - .init init,
56 - .parse parse,
57 - .final_check final_check,
58 - .print print,
59 - .compare compare,
60 - .extra_ops opts,
61 + .name = EBT_LIMIT_MATCH,
62 + .size = sizeof(struct ebt_limit_info),
63 + .help = print_help,
64 + .init = init,
65 + .parse = parse,
66 + .final_check = final_check,
67 + .print = print,
68 + .compare = compare,
69 + .extra_ops = opts,
70 };
71
72 static void _init(void) __attribute((constructor));
73 diff -Nur ebtables-v2.0.6.orig/extensions/ebt_vlan.c ebtables-v2.0.6/extensions/ebt_vlan.c
74 --- ebtables-v2.0.6.orig/extensions/ebt_vlan.c 2003-11-02 20:22:56.000000000 +0200
75 +++ ebtables-v2.0.6/extensions/ebt_vlan.c 2005-11-01 18:48:56.000000000 +0200
76 @@ -135,14 +135,16 @@
77 (struct ebt_vlan_info *) (*match)->data;
78 char *end;
79 struct ebt_vlan_info local;
80 + unsigned short id, encap;
81 + unsigned char prio;
82
83 switch (c) {
84 case VLAN_ID:
85 check_option(flags, OPT_VLAN_ID);
86 CHECK_INV_FLAG(EBT_VLAN_ID);
87 CHECK_IF_MISSING_VALUE;
88 - (unsigned short) local.id =
89 - strtoul(argv[optind - 1], &end, 10);
90 + id = strtoul(argv[optind - 1], &end, 10);
91 + local.id = (uint16_t) id;
92 CHECK_RANGE(local.id > 4094 || *end != '\0');
93 vlaninfo->id = local.id;
94 SET_BITMASK(EBT_VLAN_ID);
95 @@ -152,8 +154,8 @@
96 check_option(flags, OPT_VLAN_PRIO);
97 CHECK_INV_FLAG(EBT_VLAN_PRIO);
98 CHECK_IF_MISSING_VALUE;
99 - (unsigned char) local.prio =
100 - strtoul(argv[optind - 1], &end, 10);
101 + prio = strtoul(argv[optind - 1], &end, 10);
102 + local.prio = (uint8_t) prio;
103 CHECK_RANGE(local.prio >= 8 || *end != '\0');
104 vlaninfo->prio = local.prio;
105 SET_BITMASK(EBT_VLAN_PRIO);
106 @@ -163,8 +165,8 @@
107 check_option(flags, OPT_VLAN_ENCAP);
108 CHECK_INV_FLAG(EBT_VLAN_ENCAP);
109 CHECK_IF_MISSING_VALUE;
110 - (unsigned short) local.encap =
111 - strtoul(argv[optind - 1], &end, 16);
112 + encap = strtoul(argv[optind - 1], &end, 16);
113 + local.encap = (uint16_t) encap;
114 if (*end != '\0') {
115 ethent = getethertypebyname(argv[optind - 1]);
116 if (ethent == NULL)
This page took 0.050693 seconds and 5 git commands to generate.