ebtables/ebtables-2.0.6-gcc4.patch

99 lines
2.9 KiB
Diff

--- ebtables-v2.0.6/extensions/ebt_ip.c.BAD 2005-05-31 11:45:44.000000000 -0500
+++ ebtables-v2.0.6/extensions/ebt_ip.c 2005-05-31 11:48:53.000000000 -0500
@@ -244,6 +244,7 @@
struct ebt_ip_info *ipinfo = (struct ebt_ip_info *)(*match)->data;
char *end;
long int i;
+ unsigned char j;
switch (c) {
case IP_SOURCE:
@@ -313,7 +314,7 @@
ipinfo->invflags |= EBT_IP_PROTO;
if (optind > argc)
print_error("Missing IP protocol argument");
- (unsigned char) i = strtoul(argv[optind - 1], &end, 10);
+ j = strtoul(argv[optind - 1], &end, 10);
if (*end != '\0') {
struct protoent *pe;
@@ -324,7 +325,7 @@
argv[optind - 1]);
ipinfo->protocol = pe->p_proto;
} else {
- ipinfo->protocol = (unsigned char) i;
+ ipinfo->protocol = j;
}
ipinfo->bitmask |= EBT_IP_PROTO;
break;
--- ebtables-v2.0.6/extensions/ebt_vlan.c.BAD 2005-05-31 11:44:12.000000000 -0500
+++ ebtables-v2.0.6/extensions/ebt_vlan.c 2005-05-31 11:54:06.000000000 -0500
@@ -135,14 +135,16 @@
(struct ebt_vlan_info *) (*match)->data;
char *end;
struct ebt_vlan_info local;
+ unsigned short id, encap;
+ unsigned char prio;
switch (c) {
case VLAN_ID:
check_option(flags, OPT_VLAN_ID);
CHECK_INV_FLAG(EBT_VLAN_ID);
CHECK_IF_MISSING_VALUE;
- (unsigned short) local.id =
- strtoul(argv[optind - 1], &end, 10);
+ id = strtoul(argv[optind - 1], &end, 10);
+ local.id = (uint16_t) id;
CHECK_RANGE(local.id > 4094 || *end != '\0');
vlaninfo->id = local.id;
SET_BITMASK(EBT_VLAN_ID);
@@ -152,8 +154,8 @@
check_option(flags, OPT_VLAN_PRIO);
CHECK_INV_FLAG(EBT_VLAN_PRIO);
CHECK_IF_MISSING_VALUE;
- (unsigned char) local.prio =
- strtoul(argv[optind - 1], &end, 10);
+ prio = strtoul(argv[optind - 1], &end, 10);
+ local.prio = (uint8_t) prio;
CHECK_RANGE(local.prio >= 8 || *end != '\0');
vlaninfo->prio = local.prio;
SET_BITMASK(EBT_VLAN_PRIO);
@@ -163,8 +165,8 @@
check_option(flags, OPT_VLAN_ENCAP);
CHECK_INV_FLAG(EBT_VLAN_ENCAP);
CHECK_IF_MISSING_VALUE;
- (unsigned short) local.encap =
- strtoul(argv[optind - 1], &end, 16);
+ encap = strtoul(argv[optind - 1], &end, 16);
+ local.encap = (uint16_t) encap;
if (*end != '\0') {
ethent = getethertypebyname(argv[optind - 1]);
if (ethent == NULL)
--- ebtables-v2.0.6/extensions/ebt_limit.c.BAD 2005-05-31 11:55:53.000000000 -0500
+++ ebtables-v2.0.6/extensions/ebt_limit.c 2005-05-31 11:56:16.000000000 -0500
@@ -203,15 +203,15 @@
static struct ebt_u_match limit_match =
{
- .name EBT_LIMIT_MATCH,
- .size sizeof(struct ebt_limit_info),
- .help print_help,
- .init init,
- .parse parse,
- .final_check final_check,
- .print print,
- .compare compare,
- .extra_ops opts,
+ .name = EBT_LIMIT_MATCH,
+ .size = sizeof(struct ebt_limit_info),
+ .help = print_help,
+ .init = init,
+ .parse = parse,
+ .final_check = final_check,
+ .print = print,
+ .compare = compare,
+ .extra_ops = opts,
};
static void _init(void) __attribute((constructor));