Commit 126672f8 authored by Harald Welte's avatar Harald Welte Committed by David S. Miller

[NETFILTER]: Trivial fixes

- Fix module usage counting for ip6_tables.o
- make ipt_ULOG compile on SPARC
- fix experimental ipt_unclean match, do not consider udp w/o csum unclean
parent 109a8a82
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#include <linux/netfilter_ipv4/ipt_ULOG.h> #include <linux/netfilter_ipv4/ipt_ULOG.h>
#include <linux/netfilter_ipv4/lockhelp.h> #include <linux/netfilter_ipv4/lockhelp.h>
#include <net/sock.h> #include <net/sock.h>
#include <asm/bitops.h> #include <linux/bitops.h>
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>"); MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>");
......
...@@ -211,7 +211,7 @@ check_udp(const struct iphdr *iph, ...@@ -211,7 +211,7 @@ check_udp(const struct iphdr *iph,
/* Bad checksum? Don't print, just say it's unclean. */ /* Bad checksum? Don't print, just say it's unclean. */
/* FIXME: SRC ROUTE packets won't match checksum --RR */ /* FIXME: SRC ROUTE packets won't match checksum --RR */
if (!more_frags && !embedded if (!more_frags && !embedded && udph->check
&& csum_tcpudp_magic(iph->saddr, iph->daddr, datalen, IPPROTO_UDP, && csum_tcpudp_magic(iph->saddr, iph->daddr, datalen, IPPROTO_UDP,
csum_partial((char *)udph, datalen, 0)) != 0) csum_partial((char *)udph, datalen, 0)) != 0)
return 0; return 0;
......
...@@ -1493,6 +1493,9 @@ int ip6t_register_table(struct ip6t_table *table) ...@@ -1493,6 +1493,9 @@ int ip6t_register_table(struct ip6t_table *table)
duprintf("table->private->number = %u\n", duprintf("table->private->number = %u\n",
table->private->number); table->private->number);
/* save number of initial entries */
table->private->initial_entries = table->private->number;
table->lock = RW_LOCK_UNLOCKED; table->lock = RW_LOCK_UNLOCKED;
list_prepend(&ip6t_tables, table); list_prepend(&ip6t_tables, table);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment