Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (66 commits) be2net: fix some cmds to use mccq instead of mbox atl1e: fix 2.6.31-git4 -- ATL1E 0000:03:00.0: DMA-API: device driver frees DMA pkt_sched: Fix qstats.qlen updating in dump_stats ipv6: Log the affected address when DAD failure occurs wl12xx: Fix print_mac() conversion. af_iucv: fix race when queueing skbs on the backlog queue af_iucv: do not call iucv_sock_kill() twice af_iucv: handle non-accepted sockets after resuming from suspend af_iucv: fix race in __iucv_sock_wait() iucv: use correct output register in iucv_query_maxconn() iucv: fix iucv_buffer_cpumask check when calling IUCV functions iucv: suspend/resume error msg for left over pathes wl12xx: switch to %pM to print the mac address b44: the poll handler b44_poll must not enable IRQ unconditionally ipv6: Ignore route option with ROUTER_PREF_INVALID bonding: make ab_arp select active slaves as other modes cfg80211: fix SME connect rc80211_minstrel: fix contention window calculation ssb/sdio: fix printk format warnings p54usb: add Zcomax XG-705A usbid ...
This commit is contained in:
@@ -137,6 +137,8 @@ static DEFINE_SPINLOCK(addrconf_verify_lock);
|
||||
static void addrconf_join_anycast(struct inet6_ifaddr *ifp);
|
||||
static void addrconf_leave_anycast(struct inet6_ifaddr *ifp);
|
||||
|
||||
static void addrconf_bonding_change(struct net_device *dev,
|
||||
unsigned long event);
|
||||
static int addrconf_ifdown(struct net_device *dev, int how);
|
||||
|
||||
static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags);
|
||||
@@ -1405,8 +1407,8 @@ void addrconf_dad_failure(struct inet6_ifaddr *ifp)
|
||||
struct inet6_dev *idev = ifp->idev;
|
||||
|
||||
if (net_ratelimit())
|
||||
printk(KERN_INFO "%s: IPv6 duplicate address detected!\n",
|
||||
ifp->idev->dev->name);
|
||||
printk(KERN_INFO "%s: IPv6 duplicate address %pI6c detected!\n",
|
||||
ifp->idev->dev->name, &ifp->addr);
|
||||
|
||||
if (idev->cnf.accept_dad > 1 && !idev->cnf.disable_ipv6) {
|
||||
struct in6_addr addr;
|
||||
@@ -2582,6 +2584,10 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
|
||||
return notifier_from_errno(err);
|
||||
}
|
||||
break;
|
||||
case NETDEV_BONDING_OLDTYPE:
|
||||
case NETDEV_BONDING_NEWTYPE:
|
||||
addrconf_bonding_change(dev, event);
|
||||
break;
|
||||
}
|
||||
|
||||
return NOTIFY_OK;
|
||||
@@ -2595,6 +2601,19 @@ static struct notifier_block ipv6_dev_notf = {
|
||||
.priority = 0
|
||||
};
|
||||
|
||||
static void addrconf_bonding_change(struct net_device *dev, unsigned long event)
|
||||
{
|
||||
struct inet6_dev *idev;
|
||||
ASSERT_RTNL();
|
||||
|
||||
idev = __in6_dev_get(dev);
|
||||
|
||||
if (event == NETDEV_BONDING_NEWTYPE)
|
||||
ipv6_mc_remap(idev);
|
||||
else if (event == NETDEV_BONDING_OLDTYPE)
|
||||
ipv6_mc_unmap(idev);
|
||||
}
|
||||
|
||||
static int addrconf_ifdown(struct net_device *dev, int how)
|
||||
{
|
||||
struct inet6_dev *idev;
|
||||
|
@@ -710,7 +710,7 @@ EXPORT_SYMBOL_GPL(ipv6_opt_accepted);
|
||||
|
||||
static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto)
|
||||
{
|
||||
struct inet6_protocol *ops = NULL;
|
||||
const struct inet6_protocol *ops = NULL;
|
||||
|
||||
for (;;) {
|
||||
struct ipv6_opt_hdr *opth;
|
||||
@@ -745,7 +745,7 @@ static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto)
|
||||
static int ipv6_gso_send_check(struct sk_buff *skb)
|
||||
{
|
||||
struct ipv6hdr *ipv6h;
|
||||
struct inet6_protocol *ops;
|
||||
const struct inet6_protocol *ops;
|
||||
int err = -EINVAL;
|
||||
|
||||
if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h))))
|
||||
@@ -773,7 +773,7 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, int features)
|
||||
{
|
||||
struct sk_buff *segs = ERR_PTR(-EINVAL);
|
||||
struct ipv6hdr *ipv6h;
|
||||
struct inet6_protocol *ops;
|
||||
const struct inet6_protocol *ops;
|
||||
int proto;
|
||||
struct frag_hdr *fptr;
|
||||
unsigned int unfrag_ip6hlen;
|
||||
@@ -840,7 +840,7 @@ struct ipv6_gro_cb {
|
||||
static struct sk_buff **ipv6_gro_receive(struct sk_buff **head,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
struct inet6_protocol *ops;
|
||||
const struct inet6_protocol *ops;
|
||||
struct sk_buff **pp = NULL;
|
||||
struct sk_buff *p;
|
||||
struct ipv6hdr *iph;
|
||||
@@ -926,7 +926,7 @@ out:
|
||||
|
||||
static int ipv6_gro_complete(struct sk_buff *skb)
|
||||
{
|
||||
struct inet6_protocol *ops;
|
||||
const struct inet6_protocol *ops;
|
||||
struct ipv6hdr *iph = ipv6_hdr(skb);
|
||||
int err = -ENOSYS;
|
||||
|
||||
|
@@ -527,7 +527,7 @@ static const struct xfrm_type ah6_type =
|
||||
.hdr_offset = xfrm6_find_1stfragopt,
|
||||
};
|
||||
|
||||
static struct inet6_protocol ah6_protocol = {
|
||||
static const struct inet6_protocol ah6_protocol = {
|
||||
.handler = xfrm6_rcv,
|
||||
.err_handler = ah6_err,
|
||||
.flags = INET6_PROTO_NOPOLICY,
|
||||
|
@@ -558,7 +558,7 @@ static const struct xfrm_type esp6_type =
|
||||
.hdr_offset = xfrm6_find_1stfragopt,
|
||||
};
|
||||
|
||||
static struct inet6_protocol esp6_protocol = {
|
||||
static const struct inet6_protocol esp6_protocol = {
|
||||
.handler = xfrm6_rcv,
|
||||
.err_handler = esp6_err,
|
||||
.flags = INET6_PROTO_NOPOLICY,
|
||||
|
@@ -500,17 +500,17 @@ unknown_rh:
|
||||
return -1;
|
||||
}
|
||||
|
||||
static struct inet6_protocol rthdr_protocol = {
|
||||
static const struct inet6_protocol rthdr_protocol = {
|
||||
.handler = ipv6_rthdr_rcv,
|
||||
.flags = INET6_PROTO_NOPOLICY | INET6_PROTO_GSO_EXTHDR,
|
||||
};
|
||||
|
||||
static struct inet6_protocol destopt_protocol = {
|
||||
static const struct inet6_protocol destopt_protocol = {
|
||||
.handler = ipv6_destopt_rcv,
|
||||
.flags = INET6_PROTO_NOPOLICY | INET6_PROTO_GSO_EXTHDR,
|
||||
};
|
||||
|
||||
static struct inet6_protocol nodata_protocol = {
|
||||
static const struct inet6_protocol nodata_protocol = {
|
||||
.handler = dst_discard,
|
||||
.flags = INET6_PROTO_NOPOLICY,
|
||||
};
|
||||
|
@@ -86,7 +86,7 @@ static inline struct sock *icmpv6_sk(struct net *net)
|
||||
|
||||
static int icmpv6_rcv(struct sk_buff *skb);
|
||||
|
||||
static struct inet6_protocol icmpv6_protocol = {
|
||||
static const struct inet6_protocol icmpv6_protocol = {
|
||||
.handler = icmpv6_rcv,
|
||||
.flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
|
||||
};
|
||||
@@ -583,7 +583,7 @@ out:
|
||||
|
||||
static void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info)
|
||||
{
|
||||
struct inet6_protocol *ipprot;
|
||||
const struct inet6_protocol *ipprot;
|
||||
int inner_offset;
|
||||
int hash;
|
||||
u8 nexthdr;
|
||||
|
@@ -159,7 +159,7 @@ drop:
|
||||
|
||||
static int ip6_input_finish(struct sk_buff *skb)
|
||||
{
|
||||
struct inet6_protocol *ipprot;
|
||||
const struct inet6_protocol *ipprot;
|
||||
unsigned int nhoff;
|
||||
int nexthdr, raw;
|
||||
u8 hash;
|
||||
|
@@ -83,10 +83,6 @@ static int ip6mr_cache_report(struct net *net, struct sk_buff *pkt,
|
||||
static int ip6mr_fill_mroute(struct sk_buff *skb, struct mfc6_cache *c, struct rtmsg *rtm);
|
||||
static void mroute_clean_tables(struct net *net);
|
||||
|
||||
#ifdef CONFIG_IPV6_PIMSM_V2
|
||||
static struct inet6_protocol pim6_protocol;
|
||||
#endif
|
||||
|
||||
static struct timer_list ipmr_expire_timer;
|
||||
|
||||
|
||||
@@ -410,7 +406,7 @@ static int pim6_rcv(struct sk_buff *skb)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct inet6_protocol pim6_protocol = {
|
||||
static const struct inet6_protocol pim6_protocol = {
|
||||
.handler = pim6_rcv,
|
||||
};
|
||||
|
||||
|
@@ -178,7 +178,7 @@ static const struct xfrm_type ipcomp6_type =
|
||||
.hdr_offset = xfrm6_find_1stfragopt,
|
||||
};
|
||||
|
||||
static struct inet6_protocol ipcomp6_protocol =
|
||||
static const struct inet6_protocol ipcomp6_protocol =
|
||||
{
|
||||
.handler = xfrm6_rcv,
|
||||
.err_handler = ipcomp6_err,
|
||||
|
@@ -2249,6 +2249,25 @@ static void igmp6_timer_handler(unsigned long data)
|
||||
ma_put(ma);
|
||||
}
|
||||
|
||||
/* Device changing type */
|
||||
|
||||
void ipv6_mc_unmap(struct inet6_dev *idev)
|
||||
{
|
||||
struct ifmcaddr6 *i;
|
||||
|
||||
/* Install multicast list, except for all-nodes (already installed) */
|
||||
|
||||
read_lock_bh(&idev->lock);
|
||||
for (i = idev->mc_list; i; i = i->next)
|
||||
igmp6_group_dropped(i);
|
||||
read_unlock_bh(&idev->lock);
|
||||
}
|
||||
|
||||
void ipv6_mc_remap(struct inet6_dev *idev)
|
||||
{
|
||||
ipv6_mc_up(idev);
|
||||
}
|
||||
|
||||
/* Device going down */
|
||||
|
||||
void ipv6_mc_down(struct inet6_dev *idev)
|
||||
|
@@ -25,11 +25,11 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <net/protocol.h>
|
||||
|
||||
struct inet6_protocol *inet6_protos[MAX_INET_PROTOS];
|
||||
const struct inet6_protocol *inet6_protos[MAX_INET_PROTOS];
|
||||
static DEFINE_SPINLOCK(inet6_proto_lock);
|
||||
|
||||
|
||||
int inet6_add_protocol(struct inet6_protocol *prot, unsigned char protocol)
|
||||
int inet6_add_protocol(const struct inet6_protocol *prot, unsigned char protocol)
|
||||
{
|
||||
int ret, hash = protocol & (MAX_INET_PROTOS - 1);
|
||||
|
||||
@@ -53,7 +53,7 @@ EXPORT_SYMBOL(inet6_add_protocol);
|
||||
* Remove a protocol from the hash tables.
|
||||
*/
|
||||
|
||||
int inet6_del_protocol(struct inet6_protocol *prot, unsigned char protocol)
|
||||
int inet6_del_protocol(const struct inet6_protocol *prot, unsigned char protocol)
|
||||
{
|
||||
int ret, hash = protocol & (MAX_INET_PROTOS - 1);
|
||||
|
||||
|
@@ -627,7 +627,7 @@ fail_hdr:
|
||||
return -1;
|
||||
}
|
||||
|
||||
static struct inet6_protocol frag_protocol =
|
||||
static const struct inet6_protocol frag_protocol =
|
||||
{
|
||||
.handler = ipv6_frag_rcv,
|
||||
.flags = INET6_PROTO_NOPOLICY,
|
||||
|
@@ -481,7 +481,7 @@ int rt6_route_rcv(struct net_device *dev, u8 *opt, int len,
|
||||
|
||||
pref = rinfo->route_pref;
|
||||
if (pref == ICMPV6_ROUTER_PREF_INVALID)
|
||||
pref = ICMPV6_ROUTER_PREF_MEDIUM;
|
||||
return -EINVAL;
|
||||
|
||||
lifetime = addrconf_timeout_fixup(ntohl(rinfo->lifetime), HZ);
|
||||
|
||||
|
@@ -1846,7 +1846,7 @@ static int tcp_v6_init_sock(struct sock *sk)
|
||||
/* See draft-stevens-tcpca-spec-01 for discussion of the
|
||||
* initialization of these values.
|
||||
*/
|
||||
tp->snd_ssthresh = 0x7fffffff;
|
||||
tp->snd_ssthresh = TCP_INFINITE_SSTHRESH;
|
||||
tp->snd_cwnd_clamp = ~0;
|
||||
tp->mss_cache = 536;
|
||||
|
||||
@@ -1969,7 +1969,8 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i)
|
||||
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
|
||||
tp->snd_cwnd,
|
||||
tcp_in_initial_slowstart(tp) ? -1 : tp->snd_ssthresh
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2093,7 +2094,7 @@ struct proto tcpv6_prot = {
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct inet6_protocol tcpv6_protocol = {
|
||||
static const struct inet6_protocol tcpv6_protocol = {
|
||||
.handler = tcp_v6_rcv,
|
||||
.err_handler = tcp_v6_err,
|
||||
.gso_send_check = tcp_v6_gso_send_check,
|
||||
|
@@ -133,13 +133,13 @@ static void tunnel6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
|
||||
break;
|
||||
}
|
||||
|
||||
static struct inet6_protocol tunnel6_protocol = {
|
||||
static const struct inet6_protocol tunnel6_protocol = {
|
||||
.handler = tunnel6_rcv,
|
||||
.err_handler = tunnel6_err,
|
||||
.flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
|
||||
};
|
||||
|
||||
static struct inet6_protocol tunnel46_protocol = {
|
||||
static const struct inet6_protocol tunnel46_protocol = {
|
||||
.handler = tunnel46_rcv,
|
||||
.err_handler = tunnel6_err,
|
||||
.flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
|
||||
|
@@ -1172,7 +1172,7 @@ out:
|
||||
return segs;
|
||||
}
|
||||
|
||||
static struct inet6_protocol udpv6_protocol = {
|
||||
static const struct inet6_protocol udpv6_protocol = {
|
||||
.handler = udpv6_rcv,
|
||||
.err_handler = udpv6_err,
|
||||
.gso_send_check = udp6_ufo_send_check,
|
||||
|
@@ -25,7 +25,7 @@ static void udplitev6_err(struct sk_buff *skb,
|
||||
__udp6_lib_err(skb, opt, type, code, offset, info, &udplite_table);
|
||||
}
|
||||
|
||||
static struct inet6_protocol udplitev6_protocol = {
|
||||
static const struct inet6_protocol udplitev6_protocol = {
|
||||
.handler = udplitev6_rcv,
|
||||
.err_handler = udplitev6_err,
|
||||
.flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
|
||||
|
Reference in New Issue
Block a user