Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad08a656 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ip: limit use of gso_size to udp"

parents 4066bf4e 31886449
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1135,7 +1135,8 @@ static int ip_setup_cork(struct sock *sk, struct inet_cork *cork,
	cork->fragsize = ip_sk_use_pmtu(sk) ?
			 dst_mtu(&rt->dst) : rt->dst.dev->mtu;

	cork->gso_size = sk->sk_type == SOCK_DGRAM ? ipc->gso_size : 0;
	cork->gso_size = sk->sk_type == SOCK_DGRAM &&
			 sk->sk_protocol == IPPROTO_UDP ? ipc->gso_size : 0;
	cork->dst = &rt->dst;
	cork->length = 0;
	cork->ttl = ipc->ttl;
+2 −1
Original line number Diff line number Diff line
@@ -1229,7 +1229,8 @@ static int ip6_setup_cork(struct sock *sk, struct inet_cork_full *cork,
	if (mtu < IPV6_MIN_MTU)
		return -EINVAL;
	cork->base.fragsize = mtu;
	cork->base.gso_size = sk->sk_type == SOCK_DGRAM ? ipc6->gso_size : 0;
	cork->base.gso_size = sk->sk_type == SOCK_DGRAM &&
			      sk->sk_protocol == IPPROTO_UDP ? ipc6->gso_size : 0;

	if (dst_allfrag(rt->dst.path))
		cork->base.flags |= IPCORK_ALLFRAG;