Commit e4fddf74 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/net-2.6

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