Commit 1a186c14 authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by David S. Miller

net: udp: use skb_list_walk_safe helper for gso segments

This is a straight-forward conversion case for the new function,
iterating over the return value from udp_rcv_segment, which actually is
a wrapper around skb_gso_segment.
Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5eee7bd7
...@@ -2104,8 +2104,7 @@ static int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) ...@@ -2104,8 +2104,7 @@ static int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
BUILD_BUG_ON(sizeof(struct udp_skb_cb) > SKB_SGO_CB_OFFSET); BUILD_BUG_ON(sizeof(struct udp_skb_cb) > SKB_SGO_CB_OFFSET);
__skb_push(skb, -skb_mac_offset(skb)); __skb_push(skb, -skb_mac_offset(skb));
segs = udp_rcv_segment(sk, skb, true); segs = udp_rcv_segment(sk, skb, true);
for (skb = segs; skb; skb = next) { skb_list_walk_safe(segs, skb, next) {
next = skb->next;
__skb_pull(skb, skb_transport_offset(skb)); __skb_pull(skb, skb_transport_offset(skb));
ret = udp_queue_rcv_one_skb(sk, skb); ret = udp_queue_rcv_one_skb(sk, skb);
if (ret > 0) if (ret > 0)
......
...@@ -690,8 +690,7 @@ static int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) ...@@ -690,8 +690,7 @@ static int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
__skb_push(skb, -skb_mac_offset(skb)); __skb_push(skb, -skb_mac_offset(skb));
segs = udp_rcv_segment(sk, skb, false); segs = udp_rcv_segment(sk, skb, false);
for (skb = segs; skb; skb = next) { skb_list_walk_safe(segs, skb, next) {
next = skb->next;
__skb_pull(skb, skb_transport_offset(skb)); __skb_pull(skb, skb_transport_offset(skb));
ret = udpv6_queue_rcv_one_skb(sk, skb); ret = udpv6_queue_rcv_one_skb(sk, skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment