Skip to content

Commit ab2fb7e

Browse files
wdebruijdavem330
authored andcommitted
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 85f1bd9 ("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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 41a130f commit ab2fb7e

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

net/ipv4/ip_output.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,15 +1223,11 @@ ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page,
12231223
cork->length += size;
12241224

12251225
while (size > 0) {
1226-
if (skb_is_gso(skb)) {
1227-
len = size;
1228-
} else {
1226+
/* Check if the remaining data fits into current packet. */
1227+
len = mtu - skb->len;
1228+
if (len < size)
1229+
len = maxfraglen - skb->len;
12291230

1230-
/* Check if the remaining data fits into current packet. */
1231-
len = mtu - skb->len;
1232-
if (len < size)
1233-
len = maxfraglen - skb->len;
1234-
}
12351231
if (len <= 0) {
12361232
struct sk_buff *skb_prev;
12371233
int alloclen;

net/ipv4/udp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4)
809809
if (is_udplite) /* UDP-Lite */
810810
csum = udplite_csum(skb);
811811

812-
else if (sk->sk_no_check_tx && !skb_is_gso(skb)) { /* UDP csum off */
812+
else if (sk->sk_no_check_tx) { /* UDP csum off */
813813

814814
skb->ip_summed = CHECKSUM_NONE;
815815
goto send;

0 commit comments

Comments
 (0)