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