|
@@ -769,7 +769,9 @@ static int compat_table_info(const struct xt_table_info *info,
|
|
|
memcpy(newinfo, info, offsetof(struct xt_table_info, entries));
|
|
|
newinfo->initial_entries = 0;
|
|
|
loc_cpu_entry = info->entries;
|
|
|
- xt_compat_init_offsets(NFPROTO_ARP, info->number);
|
|
|
+ ret = xt_compat_init_offsets(NFPROTO_ARP, info->number);
|
|
|
+ if (ret)
|
|
|
+ return ret;
|
|
|
xt_entry_foreach(iter, loc_cpu_entry, info->size) {
|
|
|
ret = compat_calc_entry(iter, info, loc_cpu_entry, newinfo);
|
|
|
if (ret != 0)
|
|
@@ -1156,7 +1158,7 @@ static int translate_compat_table(struct xt_table_info **pinfo,
|
|
|
struct compat_arpt_entry *iter0;
|
|
|
struct arpt_replace repl;
|
|
|
unsigned int size;
|
|
|
- int ret = 0;
|
|
|
+ int ret;
|
|
|
|
|
|
info = *pinfo;
|
|
|
entry0 = *pentry0;
|
|
@@ -1165,7 +1167,9 @@ static int translate_compat_table(struct xt_table_info **pinfo,
|
|
|
|
|
|
j = 0;
|
|
|
xt_compat_lock(NFPROTO_ARP);
|
|
|
- xt_compat_init_offsets(NFPROTO_ARP, compatr->num_entries);
|
|
|
+ ret = xt_compat_init_offsets(NFPROTO_ARP, compatr->num_entries);
|
|
|
+ if (ret)
|
|
|
+ goto out_unlock;
|
|
|
/* Walk through entries, checking offsets. */
|
|
|
xt_entry_foreach(iter0, entry0, compatr->size) {
|
|
|
ret = check_compat_entry_size_and_hooks(iter0, info, &size,
|