source:
freewrt/package/ebtables/patches/ebtables-2.0.6-gcc4.patch@
d419478
| Last change on this file since d419478 was 475ad56, checked in by , 20 years ago | |
|---|---|
|
|
| File size: 3.9 KB | |
-
extensions/ebt_ip.c
# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../ebtables/gcc4.patch # Copyright (C) 2004 - 2005 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- diff -Nur ebtables-v2.0.6.orig/extensions/ebt_ip.c ebtables-v2.0.6/extensions/ebt_ip.c
old new 244 244 struct ebt_ip_info *ipinfo = (struct ebt_ip_info *)(*match)->data; 245 245 char *end; 246 246 long int i; 247 unsigned char j; 247 248 248 249 switch (c) { 249 250 case IP_SOURCE: … … 313 314 ipinfo->invflags |= EBT_IP_PROTO; 314 315 if (optind > argc) 315 316 print_error("Missing IP protocol argument"); 316 (unsigned char) i= strtoul(argv[optind - 1], &end, 10);317 j = strtoul(argv[optind - 1], &end, 10); 317 318 if (*end != '\0') { 318 319 struct protoent *pe; 319 320 … … 324 325 argv[optind - 1]); 325 326 ipinfo->protocol = pe->p_proto; 326 327 } else { 327 ipinfo->protocol = (unsigned char) i;328 ipinfo->protocol = j; 328 329 } 329 330 ipinfo->bitmask |= EBT_IP_PROTO; 330 331 break; -
extensions/ebt_limit.c
diff -Nur ebtables-v2.0.6.orig/extensions/ebt_limit.c ebtables-v2.0.6/extensions/ebt_limit.c
old new 203 203 204 204 static struct ebt_u_match limit_match = 205 205 { 206 .name EBT_LIMIT_MATCH,207 .size sizeof(struct ebt_limit_info),208 .help print_help,209 .init init,210 .parse parse,211 .final_check final_check,212 .print print,213 .compare compare,214 .extra_ops opts,206 .name = EBT_LIMIT_MATCH, 207 .size = sizeof(struct ebt_limit_info), 208 .help = print_help, 209 .init = init, 210 .parse = parse, 211 .final_check = final_check, 212 .print = print, 213 .compare = compare, 214 .extra_ops = opts, 215 215 }; 216 216 217 217 static void _init(void) __attribute((constructor)); -
extensions/ebt_vlan.c
diff -Nur ebtables-v2.0.6.orig/extensions/ebt_vlan.c ebtables-v2.0.6/extensions/ebt_vlan.c
old new 135 135 (struct ebt_vlan_info *) (*match)->data; 136 136 char *end; 137 137 struct ebt_vlan_info local; 138 unsigned short id, encap; 139 unsigned char prio; 138 140 139 141 switch (c) { 140 142 case VLAN_ID: 141 143 check_option(flags, OPT_VLAN_ID); 142 144 CHECK_INV_FLAG(EBT_VLAN_ID); 143 145 CHECK_IF_MISSING_VALUE; 144 (unsigned short) local.id =145 strtoul(argv[optind - 1], &end, 10);146 id = strtoul(argv[optind - 1], &end, 10); 147 local.id = (uint16_t) id; 146 148 CHECK_RANGE(local.id > 4094 || *end != '\0'); 147 149 vlaninfo->id = local.id; 148 150 SET_BITMASK(EBT_VLAN_ID); … … 152 154 check_option(flags, OPT_VLAN_PRIO); 153 155 CHECK_INV_FLAG(EBT_VLAN_PRIO); 154 156 CHECK_IF_MISSING_VALUE; 155 (unsigned char) local.prio =156 strtoul(argv[optind - 1], &end, 10);157 prio = strtoul(argv[optind - 1], &end, 10); 158 local.prio = (uint8_t) prio; 157 159 CHECK_RANGE(local.prio >= 8 || *end != '\0'); 158 160 vlaninfo->prio = local.prio; 159 161 SET_BITMASK(EBT_VLAN_PRIO); … … 163 165 check_option(flags, OPT_VLAN_ENCAP); 164 166 CHECK_INV_FLAG(EBT_VLAN_ENCAP); 165 167 CHECK_IF_MISSING_VALUE; 166 (unsigned short) local.encap =167 strtoul(argv[optind - 1], &end, 16);168 encap = strtoul(argv[optind - 1], &end, 16); 169 local.encap = (uint16_t) encap; 168 170 if (*end != '\0') { 169 171 ethent = getethertypebyname(argv[optind - 1]); 170 172 if (ethent == NULL)
Note:
See TracBrowser
for help on using the repository browser.
