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

Commit 3d7dbeac authored by David S. Miller's avatar David S. Miller
Browse files

[TCP]: Disable TSO if MD5SIG is enabled.

parent 606f585e
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -878,6 +878,7 @@ int tcp_v4_md5_do_add(struct sock *sk, __be32 addr,
				kfree(newkey);
				kfree(newkey);
				return -ENOMEM;
				return -ENOMEM;
			}
			}
			sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
		}
		}
		if (tcp_alloc_md5sig_pool() == NULL) {
		if (tcp_alloc_md5sig_pool() == NULL) {
			kfree(newkey);
			kfree(newkey);
@@ -1007,7 +1008,7 @@ static int tcp_v4_parse_md5_keys(struct sock *sk, char __user *optval,
			return -EINVAL;
			return -EINVAL;


		tp->md5sig_info = p;
		tp->md5sig_info = p;

		sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
	}
	}


	newkey = kmemdup(cmd.tcpm_key, cmd.tcpm_keylen, GFP_KERNEL);
	newkey = kmemdup(cmd.tcpm_key, cmd.tcpm_keylen, GFP_KERNEL);
+2 −0
Original line number Original line Diff line number Diff line
@@ -590,6 +590,7 @@ static int tcp_v6_md5_do_add(struct sock *sk, struct in6_addr *peer,
				kfree(newkey);
				kfree(newkey);
				return -ENOMEM;
				return -ENOMEM;
			}
			}
			sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
		}
		}
		tcp_alloc_md5sig_pool();
		tcp_alloc_md5sig_pool();
		if (tp->md5sig_info->alloced6 == tp->md5sig_info->entries6) {
		if (tp->md5sig_info->alloced6 == tp->md5sig_info->entries6) {
@@ -724,6 +725,7 @@ static int tcp_v6_parse_md5_keys (struct sock *sk, char __user *optval,
			return -ENOMEM;
			return -ENOMEM;


		tp->md5sig_info = p;
		tp->md5sig_info = p;
		sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
	}
	}


	newkey = kmemdup(cmd.tcpm_key, cmd.tcpm_keylen, GFP_KERNEL);
	newkey = kmemdup(cmd.tcpm_key, cmd.tcpm_keylen, GFP_KERNEL);