Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor conflicts in drivers/net/ethernet/mellanox/mlx5/core/en_rep.c, we had some overlapping changes: 1) In 'net' MLX5E_PARAMS_LOG_{SQ,RQ}_SIZE --> MLX5E_REP_PARAMS_LOG_{SQ,RQ}_SIZE 2) In 'net-next' params->log_rq_size is renamed to be params->log_rq_mtu_frames. 3) In 'net-next' params->hard_mtu is added. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -346,12 +346,17 @@ static struct ip_tunnel *ip_tunnel_create(struct net *net,
|
||||
struct ip_tunnel *nt;
|
||||
struct net_device *dev;
|
||||
int t_hlen;
|
||||
int mtu;
|
||||
int err;
|
||||
|
||||
dev = __ip_tunnel_create(net, itn->rtnl_link_ops, parms);
|
||||
if (IS_ERR(dev))
|
||||
return ERR_CAST(dev);
|
||||
|
||||
dev->mtu = ip_tunnel_bind_dev(dev);
|
||||
mtu = ip_tunnel_bind_dev(dev);
|
||||
err = dev_set_mtu(dev, mtu);
|
||||
if (err)
|
||||
goto err_dev_set_mtu;
|
||||
|
||||
nt = netdev_priv(dev);
|
||||
t_hlen = nt->hlen + sizeof(struct iphdr);
|
||||
@@ -359,6 +364,10 @@ static struct ip_tunnel *ip_tunnel_create(struct net *net,
|
||||
dev->max_mtu = 0xFFF8 - dev->hard_header_len - t_hlen;
|
||||
ip_tunnel_add(itn, nt);
|
||||
return nt;
|
||||
|
||||
err_dev_set_mtu:
|
||||
unregister_netdevice(dev);
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb,
|
||||
@@ -1090,17 +1099,29 @@ int ip_tunnel_newlink(struct net_device *dev, struct nlattr *tb[],
|
||||
nt->fwmark = fwmark;
|
||||
err = register_netdevice(dev);
|
||||
if (err)
|
||||
goto out;
|
||||
goto err_register_netdevice;
|
||||
|
||||
if (dev->type == ARPHRD_ETHER && !tb[IFLA_ADDRESS])
|
||||
eth_hw_addr_random(dev);
|
||||
|
||||
mtu = ip_tunnel_bind_dev(dev);
|
||||
if (!tb[IFLA_MTU])
|
||||
dev->mtu = mtu;
|
||||
if (tb[IFLA_MTU]) {
|
||||
unsigned int max = 0xfff8 - dev->hard_header_len - nt->hlen;
|
||||
|
||||
mtu = clamp(dev->mtu, (unsigned int)ETH_MIN_MTU,
|
||||
(unsigned int)(max - sizeof(struct iphdr)));
|
||||
}
|
||||
|
||||
err = dev_set_mtu(dev, mtu);
|
||||
if (err)
|
||||
goto err_dev_set_mtu;
|
||||
|
||||
ip_tunnel_add(itn, nt);
|
||||
out:
|
||||
return 0;
|
||||
|
||||
err_dev_set_mtu:
|
||||
unregister_netdevice(dev);
|
||||
err_register_netdevice:
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ip_tunnel_newlink);
|
||||
|
@@ -387,8 +387,6 @@ static int vti_tunnel_init(struct net_device *dev)
|
||||
memcpy(dev->dev_addr, &iph->saddr, 4);
|
||||
memcpy(dev->broadcast, &iph->daddr, 4);
|
||||
|
||||
dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr);
|
||||
dev->mtu = ETH_DATA_LEN;
|
||||
dev->flags = IFF_NOARP;
|
||||
dev->addr_len = 4;
|
||||
dev->features |= NETIF_F_LLTX;
|
||||
|
@@ -29,7 +29,7 @@ obj-$(CONFIG_NF_NAT_H323) += nf_nat_h323.o
|
||||
obj-$(CONFIG_NF_NAT_PPTP) += nf_nat_pptp.o
|
||||
|
||||
nf_nat_snmp_basic-y := nf_nat_snmp_basic-asn1.o nf_nat_snmp_basic_main.o
|
||||
nf_nat_snmp_basic-y : nf_nat_snmp_basic-asn1.h nf_nat_snmp_basic-asn1.c
|
||||
$(obj)/nf_nat_snmp_basic_main.o: $(obj)/nf_nat_snmp_basic-asn1.h
|
||||
obj-$(CONFIG_NF_NAT_SNMP_BASIC) += nf_nat_snmp_basic.o
|
||||
clean-files := nf_nat_snmp_basic-asn1.c nf_nat_snmp_basic-asn1.h
|
||||
|
||||
|
@@ -154,8 +154,20 @@ static unsigned int ipv4_conntrack_local(void *priv,
|
||||
struct sk_buff *skb,
|
||||
const struct nf_hook_state *state)
|
||||
{
|
||||
if (ip_is_fragment(ip_hdr(skb))) /* IP_NODEFRAG setsockopt set */
|
||||
if (ip_is_fragment(ip_hdr(skb))) { /* IP_NODEFRAG setsockopt set */
|
||||
enum ip_conntrack_info ctinfo;
|
||||
struct nf_conn *tmpl;
|
||||
|
||||
tmpl = nf_ct_get(skb, &ctinfo);
|
||||
if (tmpl && nf_ct_is_template(tmpl)) {
|
||||
/* when skipping ct, clear templates to avoid fooling
|
||||
* later targets/matches
|
||||
*/
|
||||
skb->_nfct = 0;
|
||||
nf_ct_put(tmpl);
|
||||
}
|
||||
return NF_ACCEPT;
|
||||
}
|
||||
|
||||
return nf_conntrack_in(state->net, PF_INET, state->hook, skb);
|
||||
}
|
||||
|
@@ -108,10 +108,12 @@ struct sock *nf_sk_lookup_slow_v4(struct net *net, const struct sk_buff *skb,
|
||||
int doff = 0;
|
||||
|
||||
if (iph->protocol == IPPROTO_UDP || iph->protocol == IPPROTO_TCP) {
|
||||
struct udphdr _hdr, *hp;
|
||||
struct tcphdr _hdr;
|
||||
struct udphdr *hp;
|
||||
|
||||
hp = skb_header_pointer(skb, ip_hdrlen(skb),
|
||||
sizeof(_hdr), &_hdr);
|
||||
iph->protocol == IPPROTO_UDP ?
|
||||
sizeof(*hp) : sizeof(_hdr), &_hdr);
|
||||
if (hp == NULL)
|
||||
return NULL;
|
||||
|
||||
|
@@ -349,6 +349,8 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb)
|
||||
req->ts_recent = tcp_opt.saw_tstamp ? tcp_opt.rcv_tsval : 0;
|
||||
treq->snt_synack = 0;
|
||||
treq->tfo_listener = false;
|
||||
if (IS_ENABLED(CONFIG_SMC))
|
||||
ireq->smc_ok = 0;
|
||||
|
||||
ireq->ir_iif = inet_request_bound_dev_if(sk, skb);
|
||||
|
||||
|
@@ -6255,6 +6255,9 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
|
||||
if (want_cookie && !tmp_opt.saw_tstamp)
|
||||
tcp_clear_options(&tmp_opt);
|
||||
|
||||
if (IS_ENABLED(CONFIG_SMC) && want_cookie)
|
||||
tmp_opt.smc_ok = 0;
|
||||
|
||||
tmp_opt.tstamp_ok = tmp_opt.saw_tstamp;
|
||||
tcp_openreq_init(req, &tmp_opt, skb, sk);
|
||||
inet_rsk(req)->no_srccheck = inet_sk(sk)->transparent;
|
||||
|
Reference in New Issue
Block a user