diff options
author | Willem de Bruijn <willemb@google.com> | 2017-08-22 11:39:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-22 14:27:18 -0700 |
commit | ab2fb7e3240d24c68f854aa1b972fe415d8d1b3e (patch) | |
tree | 28d256ab3b68830c0fd8262e81d1e0627ab8609f /net/ipv4/ip_output.c | |
parent | 41a130f7c61d2adb303852d3fca938ad138a96d8 (diff) | |
download | op-kernel-dev-ab2fb7e3240d24c68f854aa1b972fe415d8d1b3e.zip op-kernel-dev-ab2fb7e3240d24c68f854aa1b972fe415d8d1b3e.tar.gz |
udp: remove unreachable ufo branches
Remove two references to ufo in the udp send path that are no longer
reachable now that ufo has been removed.
Commit 85f1bd9a7b5a ("udp: consistently apply ufo or fragmentation")
is a fix to ufo. It is safe to revert what remains of it.
Also, no skb can enter ip_append_page with skb_is_gso true now that
skb_shinfo(skb)->gso_type is no longer set in ip_append_page/_data.
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 73b0b15..e8e675b 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -1223,15 +1223,11 @@ ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page, cork->length += size; while (size > 0) { - if (skb_is_gso(skb)) { - len = size; - } else { + /* Check if the remaining data fits into current packet. */ + len = mtu - skb->len; + if (len < size) + len = maxfraglen - skb->len; - /* Check if the remaining data fits into current packet. */ - len = mtu - skb->len; - if (len < size) - len = maxfraglen - skb->len; - } if (len <= 0) { struct sk_buff *skb_prev; int alloclen; |