mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 08:44:14 +08:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix handling of initial STATE message in TIPC, from Jon Paul Maloy. 2) Fix stats handling in bcm_sysport_get_stats(), from Florian Fainelli. 3) Reject 16777215 VNI value in geneve_validate(), from Girish Moodalbail. 4) Fix initial IGMP sysctl setting regression, from Nikolay Borisov. 5) Once a UFO fragmented frame is treated as UFO, we should continue doing so. Likewise once a frame has been segmented, we should continue doing that and not try to convert it to a UFO frame. From Willem de Bruijn. 6) Test the AF_PACKET RX/TX ring pg_vec state under the socket lock to prevent races. From Willem de Bruijn. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: packet: fix tp_reserve race in packet_set_ring udp: consistently apply ufo or fragmentation net: sched: set xt_tgchk_param par.nft_compat as 0 in ipt_init_target igmp: Fix regression caused by igmp sysctl namespace code. geneve: maximum value of VNI cannot be used net: systemport: Fix software statistics for SYSTEMPORT Lite tipc: remove premature ESTABLISH FSM event at link synchronization
This commit is contained in:
commit
26273939ac
@ -449,6 +449,10 @@ static void bcm_sysport_get_stats(struct net_device *dev,
|
||||
p = (char *)&dev->stats;
|
||||
else
|
||||
p = (char *)priv;
|
||||
|
||||
if (priv->is_lite && !bcm_sysport_lite_stat_valid(s->type))
|
||||
continue;
|
||||
|
||||
p += s->stat_offset;
|
||||
data[j] = *(unsigned long *)p;
|
||||
j++;
|
||||
|
@ -1091,7 +1091,7 @@ static int geneve_validate(struct nlattr *tb[], struct nlattr *data[],
|
||||
if (data[IFLA_GENEVE_ID]) {
|
||||
__u32 vni = nla_get_u32(data[IFLA_GENEVE_ID]);
|
||||
|
||||
if (vni >= GENEVE_VID_MASK)
|
||||
if (vni >= GENEVE_N_VID)
|
||||
return -ERANGE;
|
||||
}
|
||||
|
||||
|
@ -1731,6 +1731,13 @@ static __net_init int inet_init_net(struct net *net)
|
||||
net->ipv4.sysctl_ip_prot_sock = PROT_SOCK;
|
||||
#endif
|
||||
|
||||
/* Some igmp sysctl, whose values are always used */
|
||||
net->ipv4.sysctl_igmp_max_memberships = 20;
|
||||
net->ipv4.sysctl_igmp_max_msf = 10;
|
||||
/* IGMP reports for link-local multicast groups are enabled by default */
|
||||
net->ipv4.sysctl_igmp_llm_reports = 1;
|
||||
net->ipv4.sysctl_igmp_qrv = 2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2974,12 +2974,6 @@ static int __net_init igmp_net_init(struct net *net)
|
||||
goto out_sock;
|
||||
}
|
||||
|
||||
/* Sysctl initialization */
|
||||
net->ipv4.sysctl_igmp_max_memberships = 20;
|
||||
net->ipv4.sysctl_igmp_max_msf = 10;
|
||||
/* IGMP reports for link-local multicast groups are enabled by default */
|
||||
net->ipv4.sysctl_igmp_llm_reports = 1;
|
||||
net->ipv4.sysctl_igmp_qrv = 2;
|
||||
return 0;
|
||||
|
||||
out_sock:
|
||||
|
@ -965,11 +965,12 @@ static int __ip_append_data(struct sock *sk,
|
||||
csummode = CHECKSUM_PARTIAL;
|
||||
|
||||
cork->length += length;
|
||||
if ((((length + (skb ? skb->len : fragheaderlen)) > mtu) ||
|
||||
(skb && skb_is_gso(skb))) &&
|
||||
if ((skb && skb_is_gso(skb)) ||
|
||||
(((length + (skb ? skb->len : fragheaderlen)) > mtu) &&
|
||||
(skb_queue_len(queue) <= 1) &&
|
||||
(sk->sk_protocol == IPPROTO_UDP) &&
|
||||
(rt->dst.dev->features & NETIF_F_UFO) && !dst_xfrm(&rt->dst) &&
|
||||
(sk->sk_type == SOCK_DGRAM) && !sk->sk_no_check_tx) {
|
||||
(sk->sk_type == SOCK_DGRAM) && !sk->sk_no_check_tx)) {
|
||||
err = ip_ufo_append_data(sk, queue, getfrag, from, length,
|
||||
hh_len, fragheaderlen, transhdrlen,
|
||||
maxfraglen, flags);
|
||||
@ -1288,6 +1289,7 @@ ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page,
|
||||
return -EINVAL;
|
||||
|
||||
if ((size + skb->len > mtu) &&
|
||||
(skb_queue_len(&sk->sk_write_queue) == 1) &&
|
||||
(sk->sk_protocol == IPPROTO_UDP) &&
|
||||
(rt->dst.dev->features & NETIF_F_UFO)) {
|
||||
if (skb->ip_summed != CHECKSUM_PARTIAL)
|
||||
|
@ -802,7 +802,7 @@ static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4)
|
||||
if (is_udplite) /* UDP-Lite */
|
||||
csum = udplite_csum(skb);
|
||||
|
||||
else if (sk->sk_no_check_tx) { /* UDP csum disabled */
|
||||
else if (sk->sk_no_check_tx && !skb_is_gso(skb)) { /* UDP csum off */
|
||||
|
||||
skb->ip_summed = CHECKSUM_NONE;
|
||||
goto send;
|
||||
|
@ -1381,11 +1381,12 @@ emsgsize:
|
||||
*/
|
||||
|
||||
cork->length += length;
|
||||
if ((((length + (skb ? skb->len : headersize)) > mtu) ||
|
||||
(skb && skb_is_gso(skb))) &&
|
||||
if ((skb && skb_is_gso(skb)) ||
|
||||
(((length + (skb ? skb->len : headersize)) > mtu) &&
|
||||
(skb_queue_len(queue) <= 1) &&
|
||||
(sk->sk_protocol == IPPROTO_UDP) &&
|
||||
(rt->dst.dev->features & NETIF_F_UFO) && !dst_xfrm(&rt->dst) &&
|
||||
(sk->sk_type == SOCK_DGRAM) && !udp_get_no_check6_tx(sk)) {
|
||||
(sk->sk_type == SOCK_DGRAM) && !udp_get_no_check6_tx(sk))) {
|
||||
err = ip6_ufo_append_data(sk, queue, getfrag, from, length,
|
||||
hh_len, fragheaderlen, exthdrlen,
|
||||
transhdrlen, mtu, flags, fl6);
|
||||
|
@ -3700,14 +3700,19 @@ packet_setsockopt(struct socket *sock, int level, int optname, char __user *optv
|
||||
|
||||
if (optlen != sizeof(val))
|
||||
return -EINVAL;
|
||||
if (po->rx_ring.pg_vec || po->tx_ring.pg_vec)
|
||||
return -EBUSY;
|
||||
if (copy_from_user(&val, optval, sizeof(val)))
|
||||
return -EFAULT;
|
||||
if (val > INT_MAX)
|
||||
return -EINVAL;
|
||||
po->tp_reserve = val;
|
||||
return 0;
|
||||
lock_sock(sk);
|
||||
if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) {
|
||||
ret = -EBUSY;
|
||||
} else {
|
||||
po->tp_reserve = val;
|
||||
ret = 0;
|
||||
}
|
||||
release_sock(sk);
|
||||
return ret;
|
||||
}
|
||||
case PACKET_LOSS:
|
||||
{
|
||||
|
@ -49,9 +49,9 @@ static int ipt_init_target(struct net *net, struct xt_entry_target *t,
|
||||
return PTR_ERR(target);
|
||||
|
||||
t->u.kernel.target = target;
|
||||
memset(&par, 0, sizeof(par));
|
||||
par.net = net;
|
||||
par.table = table;
|
||||
par.entryinfo = NULL;
|
||||
par.target = target;
|
||||
par.targinfo = t->data;
|
||||
par.hook_mask = hook;
|
||||
|
@ -1455,10 +1455,8 @@ static bool tipc_node_check_state(struct tipc_node *n, struct sk_buff *skb,
|
||||
/* Initiate synch mode if applicable */
|
||||
if ((usr == TUNNEL_PROTOCOL) && (mtyp == SYNCH_MSG) && (oseqno == 1)) {
|
||||
syncpt = iseqno + exp_pkts - 1;
|
||||
if (!tipc_link_is_up(l)) {
|
||||
tipc_link_fsm_evt(l, LINK_ESTABLISH_EVT);
|
||||
if (!tipc_link_is_up(l))
|
||||
__tipc_node_link_up(n, bearer_id, xmitq);
|
||||
}
|
||||
if (n->state == SELF_UP_PEER_UP) {
|
||||
n->sync_point = syncpt;
|
||||
tipc_link_fsm_evt(l, LINK_SYNCH_BEGIN_EVT);
|
||||
|
Loading…
Reference in New Issue
Block a user