Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/team/team.c drivers/net/usb/qmi_wwan.c net/batman-adv/bat_iv_ogm.c net/ipv4/fib_frontend.c net/ipv4/route.c net/l2tp/l2tp_netlink.c The team, fib_frontend, route, and l2tp_netlink conflicts were simply overlapping changes. qmi_wwan and bat_iv_ogm were of the "use HEAD" variety. With help from Antonio Quartulli. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -722,7 +722,7 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)
|
||||
break;
|
||||
|
||||
case SIOCSIFFLAGS:
|
||||
ret = -EACCES;
|
||||
ret = -EPERM;
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
goto out;
|
||||
break;
|
||||
@@ -730,7 +730,7 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)
|
||||
case SIOCSIFBRDADDR: /* Set the broadcast address */
|
||||
case SIOCSIFDSTADDR: /* Set the destination address */
|
||||
case SIOCSIFNETMASK: /* Set the netmask for the interface */
|
||||
ret = -EACCES;
|
||||
ret = -EPERM;
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
goto out;
|
||||
ret = -EINVAL;
|
||||
|
@@ -510,7 +510,10 @@ relookup:
|
||||
secure_ipv6_id(daddr->addr.a6));
|
||||
p->metrics[RTAX_LOCK-1] = INETPEER_METRICS_NEW;
|
||||
p->rate_tokens = 0;
|
||||
p->rate_last = 0;
|
||||
/* 60*HZ is arbitrary, but chosen enough high so that the first
|
||||
* calculation of tokens is at its maximum.
|
||||
*/
|
||||
p->rate_last = jiffies - 60*HZ;
|
||||
INIT_LIST_HEAD(&p->gc_list);
|
||||
|
||||
/* Link the node. */
|
||||
|
@@ -131,18 +131,20 @@ found:
|
||||
* 0 - deliver
|
||||
* 1 - block
|
||||
*/
|
||||
static __inline__ int icmp_filter(struct sock *sk, struct sk_buff *skb)
|
||||
static int icmp_filter(const struct sock *sk, const struct sk_buff *skb)
|
||||
{
|
||||
int type;
|
||||
struct icmphdr _hdr;
|
||||
const struct icmphdr *hdr;
|
||||
|
||||
if (!pskb_may_pull(skb, sizeof(struct icmphdr)))
|
||||
hdr = skb_header_pointer(skb, skb_transport_offset(skb),
|
||||
sizeof(_hdr), &_hdr);
|
||||
if (!hdr)
|
||||
return 1;
|
||||
|
||||
type = icmp_hdr(skb)->type;
|
||||
if (type < 32) {
|
||||
if (hdr->type < 32) {
|
||||
__u32 data = raw_sk(sk)->filter.data;
|
||||
|
||||
return ((1 << type) & data) != 0;
|
||||
return ((1U << hdr->type) & data) != 0;
|
||||
}
|
||||
|
||||
/* Do not block unknown ICMP types */
|
||||
|
@@ -202,11 +202,6 @@ EXPORT_SYMBOL(ip_tos2prio);
|
||||
static DEFINE_PER_CPU(struct rt_cache_stat, rt_cache_stat);
|
||||
#define RT_CACHE_STAT_INC(field) __this_cpu_inc(rt_cache_stat.field)
|
||||
|
||||
static inline int rt_genid(struct net *net)
|
||||
{
|
||||
return atomic_read(&net->ipv4.rt_genid);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
static void *rt_cache_seq_start(struct seq_file *seq, loff_t *pos)
|
||||
{
|
||||
@@ -449,7 +444,7 @@ static inline bool rt_is_expired(const struct rtable *rth)
|
||||
|
||||
void rt_cache_flush(struct net *net)
|
||||
{
|
||||
atomic_inc(&net->ipv4.rt_genid);
|
||||
rt_genid_bump(net);
|
||||
}
|
||||
|
||||
static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst,
|
||||
@@ -2506,7 +2501,7 @@ static __net_initdata struct pernet_operations sysctl_route_ops = {
|
||||
|
||||
static __net_init int rt_genid_init(struct net *net)
|
||||
{
|
||||
atomic_set(&net->ipv4.rt_genid, 0);
|
||||
atomic_set(&net->rt_genid, 0);
|
||||
get_random_bytes(&net->ipv4.dev_addr_genid,
|
||||
sizeof(net->ipv4.dev_addr_genid));
|
||||
return 0;
|
||||
|
@@ -1738,8 +1738,14 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_DMA
|
||||
if (tp->ucopy.dma_chan)
|
||||
dma_async_memcpy_issue_pending(tp->ucopy.dma_chan);
|
||||
if (tp->ucopy.dma_chan) {
|
||||
if (tp->rcv_wnd == 0 &&
|
||||
!skb_queue_empty(&sk->sk_async_wait_queue)) {
|
||||
tcp_service_net_dma(sk, true);
|
||||
tcp_cleanup_rbuf(sk, copied);
|
||||
} else
|
||||
dma_async_memcpy_issue_pending(tp->ucopy.dma_chan);
|
||||
}
|
||||
#endif
|
||||
if (copied >= target) {
|
||||
/* Do not sleep, just process backlog. */
|
||||
@@ -2320,10 +2326,17 @@ static int tcp_repair_options_est(struct tcp_sock *tp,
|
||||
tp->rx_opt.mss_clamp = opt.opt_val;
|
||||
break;
|
||||
case TCPOPT_WINDOW:
|
||||
if (opt.opt_val > 14)
|
||||
return -EFBIG;
|
||||
{
|
||||
u16 snd_wscale = opt.opt_val & 0xFFFF;
|
||||
u16 rcv_wscale = opt.opt_val >> 16;
|
||||
|
||||
tp->rx_opt.snd_wscale = opt.opt_val;
|
||||
if (snd_wscale > 14 || rcv_wscale > 14)
|
||||
return -EFBIG;
|
||||
|
||||
tp->rx_opt.snd_wscale = snd_wscale;
|
||||
tp->rx_opt.rcv_wscale = rcv_wscale;
|
||||
tp->rx_opt.wscale_ok = 1;
|
||||
}
|
||||
break;
|
||||
case TCPOPT_SACK_PERM:
|
||||
if (opt.opt_val != 0)
|
||||
|
@@ -4634,7 +4634,7 @@ queue_and_out:
|
||||
|
||||
if (eaten > 0)
|
||||
kfree_skb_partial(skb, fragstolen);
|
||||
else if (!sock_flag(sk, SOCK_DEAD))
|
||||
if (!sock_flag(sk, SOCK_DEAD))
|
||||
sk->sk_data_ready(sk, 0);
|
||||
return;
|
||||
}
|
||||
@@ -5529,8 +5529,7 @@ no_ack:
|
||||
#endif
|
||||
if (eaten)
|
||||
kfree_skb_partial(skb, fragstolen);
|
||||
else
|
||||
sk->sk_data_ready(sk, 0);
|
||||
sk->sk_data_ready(sk, 0);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user