Re: [PATCH 08/24] [NETFILTER]: rename NF_ARP to AF_ARP and assign a non-clashing value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thursday 2008-04-03 15:17, Patrick McHardy wrote:
>  Is this used by userspace? If not, why change it?

 Change, because NF_ARP is used to wrongly index into xt_afinfo -- it
 overlaps with PF_UNSPEC. Since NF_ARP is only used very internally in
 the kernel, it can be changed. To avoid problems, PF_ARP gets a
 proper slot.

and arp isn't an address family.

Neither is PF_BRIDGE, yet this is also used.

I would suggest to
just define something kernel-internally that doesn't clash,
like using AF_MAX + X as base.

Then we'd have to insert a bunch of if()s in hotpaths that
filter out the nonconformists again, or have a higher
memory footprint.

I don't like exporting this since, as you say, userspace doesn't
need it

Somehow you have to say that an extension if for arp only.
We could abuse ETH_P_ARP, but using just the same name and value
across both user and kernelspace seems just more logical.

static struct xtables_target new_arp_mangle = {
	.family = ETH_P_ARP,
};
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux