Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/wireless/iwlwifi/iwl4965-base.c
This commit is contained in:
@@ -100,6 +100,15 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
|
||||
if (hdr->version != 6)
|
||||
goto err;
|
||||
|
||||
/*
|
||||
* RFC4291 2.5.3
|
||||
* A packet received on an interface with a destination address
|
||||
* of loopback must be dropped.
|
||||
*/
|
||||
if (!(dev->flags & IFF_LOOPBACK) &&
|
||||
ipv6_addr_loopback(&hdr->daddr))
|
||||
goto err;
|
||||
|
||||
skb->transport_header = skb->network_header + sizeof(*hdr);
|
||||
IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr);
|
||||
|
||||
|
@@ -343,18 +343,21 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
|
||||
case IPV6_DSTOPTS:
|
||||
{
|
||||
struct ipv6_txoptions *opt;
|
||||
|
||||
/* remove any sticky options header with a zero option
|
||||
* length, per RFC3542.
|
||||
*/
|
||||
if (optlen == 0)
|
||||
optval = NULL;
|
||||
else if (optlen < sizeof(struct ipv6_opt_hdr) ||
|
||||
optlen & 0x7 || optlen > 8 * 255)
|
||||
goto e_inval;
|
||||
|
||||
/* hop-by-hop / destination options are privileged option */
|
||||
retv = -EPERM;
|
||||
if (optname != IPV6_RTHDR && !capable(CAP_NET_RAW))
|
||||
break;
|
||||
|
||||
if (optlen < sizeof(struct ipv6_opt_hdr) ||
|
||||
optlen & 0x7 || optlen > 8 * 255)
|
||||
goto e_inval;
|
||||
|
||||
opt = ipv6_renew_options(sk, np->opt, optname,
|
||||
(struct ipv6_opt_hdr __user *)optval,
|
||||
optlen);
|
||||
|
@@ -129,7 +129,7 @@ static struct nf_hook_ops ip6t_ops[] __read_mostly = {
|
||||
.priority = NF_IP6_PRI_MANGLE,
|
||||
},
|
||||
{
|
||||
.hook = ip6t_local_hook,
|
||||
.hook = ip6t_route_hook,
|
||||
.owner = THIS_MODULE,
|
||||
.pf = PF_INET6,
|
||||
.hooknum = NF_INET_LOCAL_IN,
|
||||
|
@@ -207,9 +207,10 @@ fq_find(__be32 id, struct in6_addr *src, struct in6_addr *dst)
|
||||
arg.id = id;
|
||||
arg.src = src;
|
||||
arg.dst = dst;
|
||||
|
||||
read_lock_bh(&nf_frags.lock);
|
||||
hash = ip6qhashfn(id, src, dst);
|
||||
|
||||
local_bh_disable();
|
||||
q = inet_frag_find(&nf_init_frags, &nf_frags, &arg, hash);
|
||||
local_bh_enable();
|
||||
if (q == NULL)
|
||||
|
@@ -245,6 +245,8 @@ fq_find(struct net *net, __be32 id, struct in6_addr *src, struct in6_addr *dst,
|
||||
arg.id = id;
|
||||
arg.src = src;
|
||||
arg.dst = dst;
|
||||
|
||||
read_lock(&ip6_frags.lock);
|
||||
hash = ip6qhashfn(id, src, dst);
|
||||
|
||||
q = inet_frag_find(&net->ipv6.frags, &ip6_frags, &arg, hash);
|
||||
|
@@ -238,7 +238,7 @@ static inline int rt6_need_strict(struct in6_addr *daddr)
|
||||
static inline struct rt6_info *rt6_device_match(struct net *net,
|
||||
struct rt6_info *rt,
|
||||
int oif,
|
||||
int strict)
|
||||
int flags)
|
||||
{
|
||||
struct rt6_info *local = NULL;
|
||||
struct rt6_info *sprt;
|
||||
@@ -251,7 +251,7 @@ static inline struct rt6_info *rt6_device_match(struct net *net,
|
||||
if (dev->flags & IFF_LOOPBACK) {
|
||||
if (sprt->rt6i_idev == NULL ||
|
||||
sprt->rt6i_idev->dev->ifindex != oif) {
|
||||
if (strict && oif)
|
||||
if (flags & RT6_LOOKUP_F_IFACE && oif)
|
||||
continue;
|
||||
if (local && (!oif ||
|
||||
local->rt6i_idev->dev->ifindex == oif))
|
||||
@@ -264,7 +264,7 @@ static inline struct rt6_info *rt6_device_match(struct net *net,
|
||||
if (local)
|
||||
return local;
|
||||
|
||||
if (strict)
|
||||
if (flags & RT6_LOOKUP_F_IFACE)
|
||||
return net->ipv6.ip6_null_entry;
|
||||
}
|
||||
return rt;
|
||||
|
@@ -1946,7 +1946,7 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i)
|
||||
|
||||
seq_printf(seq,
|
||||
"%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X "
|
||||
"%02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %u %u %u %u %d\n",
|
||||
"%02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %lu %lu %u %u %d\n",
|
||||
i,
|
||||
src->s6_addr32[0], src->s6_addr32[1],
|
||||
src->s6_addr32[2], src->s6_addr32[3], srcp,
|
||||
@@ -1962,8 +1962,8 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i)
|
||||
icsk->icsk_probes_out,
|
||||
sock_i_ino(sp),
|
||||
atomic_read(&sp->sk_refcnt), sp,
|
||||
icsk->icsk_rto,
|
||||
icsk->icsk_ack.ato,
|
||||
jiffies_to_clock_t(icsk->icsk_rto),
|
||||
jiffies_to_clock_t(icsk->icsk_ack.ato),
|
||||
(icsk->icsk_ack.quick << 1 ) | icsk->icsk_ack.pingpong,
|
||||
tp->snd_cwnd, tp->snd_ssthresh>=0xFFFF?-1:tp->snd_ssthresh
|
||||
);
|
||||
|
Reference in New Issue
Block a user