Commit e5e70f13 authored by David S. Miller's avatar David S. Miller

Merge davem@nuts.davemloft.net:/disk1/BK/net-2.6

into kernel.bkbits.net:/home/davem/net-2.6
parents 96531b37 3a57ff0c
......@@ -3511,9 +3511,9 @@ E: yoshfuji@linux-ipv6.org
W: http://www.yoshifuji.org/~hideaki/
P: 1024D/E0620EEA 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
D: IPv6 and other networking related stuff
D: USAGI/WIDE Project, The University of Tokyo
S: Green House #102, 1-15-5, Nishikata,
S: Bunkyo, Tokyo 113-0024
D: USAGI/WIDE Project, Keio University
S: Jeunet Palace Kawasaki #1-201, 10-2, Furukawa-cho, Saiwai-ku
S: Kawasaki, Kanagawa 212-0025
S: Japan
N: Eric Youngdale
......
......@@ -36,8 +36,6 @@ struct in_device
rwlock_t lock;
int dead;
struct in_ifaddr *ifa_list; /* IP ifaddr chain */
int mc_initted;
struct ip_mc_list *mc_list; /* IP multicast filter chain */
rwlock_t mc_lock; /* for mc_tomb */
struct ip_mc_list *mc_tomb;
......
......@@ -156,7 +156,8 @@ struct ip_conntrack_expect
union ip_conntrack_expect_help help;
};
#include <linux/netfilter_ipv4/ip_conntrack_helper.h>
struct ip_conntrack_helper;
struct ip_conntrack
{
/* Usage count in here is 1 for hash table/destruct timer, 1 per skb,
......
......@@ -103,7 +103,7 @@ static ssize_t proc_mpc_read(struct file *file, char *buff,
size_t count, loff_t *pos){
unsigned long page = 0;
unsigned char *temp;
ssize_t length = 0;
int length = 0;
int i = 0;
struct mpoa_client *mpc = mpcs;
in_cache_entry *in_entry;
......
......@@ -165,6 +165,7 @@ struct in_device *inetdev_init(struct net_device *dev)
#ifdef CONFIG_SYSCTL
devinet_sysctl_register(in_dev, &in_dev->cnf);
#endif
ip_mc_init_dev(in_dev);
if (dev->flags & IFF_UP)
ip_mc_up(in_dev);
out:
......
......@@ -1217,8 +1217,8 @@ void ip_mc_down(struct in_device *in_dev)
ASSERT_RTNL();
if (!in_dev->mc_initted)
return;
for (i=in_dev->mc_list; i; i=i->next)
igmp_group_dropped(i);
#ifdef CONFIG_IP_MULTICAST
in_dev->mr_ifc_count = 0;
......@@ -1227,24 +1227,14 @@ void ip_mc_down(struct in_device *in_dev)
in_dev->mr_gq_running = 0;
if (del_timer(&in_dev->mr_gq_timer))
__in_dev_put(in_dev);
#endif
for (i=in_dev->mc_list; i; i=i->next)
igmp_group_dropped(i);
#ifdef CONFIG_IP_MULTICAST
igmpv3_clear_delrec(in_dev);
#endif
ip_mc_dec_group(in_dev, IGMP_ALL_HOSTS);
}
/* Device going up */
void ip_mc_up(struct in_device *in_dev)
void ip_mc_init_dev(struct in_device *in_dev)
{
struct ip_mc_list *i;
ASSERT_RTNL();
in_dev->mc_tomb = 0;
......@@ -1261,12 +1251,20 @@ void ip_mc_up(struct in_device *in_dev)
#endif
in_dev->mc_lock = RW_LOCK_UNLOCKED;
}
/* Device going up */
void ip_mc_up(struct in_device *in_dev)
{
struct ip_mc_list *i;
ASSERT_RTNL();
ip_mc_inc_group(in_dev, IGMP_ALL_HOSTS);
for (i=in_dev->mc_list; i; i=i->next)
igmp_group_added(i);
in_dev->mc_initted = 1;
}
/*
......
......@@ -24,6 +24,9 @@
#include <net/route.h>
#include <linux/netfilter_ipv4/ip_tables.h>
#include <linux/netfilter_ipv4/ipt_REJECT.h>
#ifdef CONFIG_BRIDGE_NETFILTER
#include <linux/netfilter_bridge.h>
#endif
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>");
......@@ -56,7 +59,13 @@ static inline struct rtable *route_reverse(struct sk_buff *skb, int hook)
struct flowi fl = {};
struct rtable *rt;
if (hook != NF_IP_FORWARD) {
/* We don't require ip forwarding to be enabled to be able to
* send a RST reply for bridged traffic. */
if (hook != NF_IP_FORWARD
#ifdef CONFIG_BRIDGE_NETFILTER
|| (skb->nf_bridge && skb->nf_bridge->mask & BRNF_BRIDGED)
#endif
) {
fl.nl_u.ip4_u.daddr = iph->saddr;
if (hook == NF_IP_LOCAL_IN)
fl.nl_u.ip4_u.saddr = iph->daddr;
......
......@@ -1639,7 +1639,7 @@ static int tcp_v6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
no_tcp_socket:
if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb))
goto discard_and_relse;
goto discard_it;
if (skb->len < (th->doff<<2) || tcp_checksum_complete(skb)) {
bad_packet:
......@@ -1662,12 +1662,14 @@ static int tcp_v6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
goto discard_it;
do_time_wait:
if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb))
goto discard_and_relse;
if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) {
tcp_tw_put((struct tcp_tw_bucket *) sk);
goto discard_it;
}
if (skb->len < (th->doff<<2) || tcp_checksum_complete(skb)) {
TCP_INC_STATS_BH(TcpInErrs);
sock_put(sk);
tcp_tw_put((struct tcp_tw_bucket *) sk);
goto discard_it;
}
......
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