summaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_HMARK.c
Commit message (Collapse)AuthorAgeFilesLines
* ipv6: Move ipv6_find_hdr() out of Netfilter code.Jesse Gross2012-11-101-4/+4
| | | | | | | Open vSwitch will soon also use ipv6_find_hdr() so this moves it out of Netfilter-specific code into a more common location. Signed-off-by: Jesse Gross <jesse@nicira.com>
* netfilter: xt_HMARK: fix endianness and provide consistent hashingHans Schillstrom2012-06-071-31/+41
| | | | | | | | | | | | | This patch addresses two issues: a) Fix usage of u32 and __be32 that causes endianess warnings via sparse. b) Ensure consistent hashing in a cluster that is composed of big and little endian systems. Thus, we obtain the same hash mark in an heterogeneous cluster. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Schillstrom <hans@schillstrom.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netfilter: xt_HMARK: modulus is expensive for hash calculationPablo Neira Ayuso2012-05-171-1/+1
| | | | | | | | | | Use: ((u64)(HASH_VAL * HASH_SIZE)) >> 32 as suggested by David S. Miller. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netfilter: xt_HMARK: potential NULL dereference in get_inner_hdr()Dan Carpenter2012-05-171-1/+1
| | | | | | | | | | There is a typo in the error checking and "&&" was used instead of "||". If skb_header_pointer() returns NULL then it leads to a NULL dereference. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Hans Schillstrom <hans.schillstrom@ericsson.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netfilter: add xt_hmark target for hash-based skb markingHans Schillstrom2012-05-091-0/+362
The target allows you to create rules in the "raw" and "mangle" tables which set the skbuff mark by means of hash calculation within a given range. The nfmark can influence the routing method (see "Use netfilter MARK value as routing key") and can also be used by other subsystems to change their behaviour. [ Part of this patch has been refactorized and modified by Pablo Neira Ayuso ] Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>