Skip to content

Commit a12daf1

Browse files
edumazetdavem330
authored andcommitted
tcp: rename tcp_v4_err() skb parameter
This essentially reverts 4d1a2d9 ("Revert Backoff [v3]: Rename skb to icmp_skb in tcp_v4_err()") Now we have tcp_ld_RTO_revert() helper, we can use the usual name for sk_buff parameter, so that tcp_v4_err() and tcp_v6_err() use similar names. Signed-off-by: Eric Dumazet <[email protected]> Acked-by: Neal Cardwell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f745664 commit a12daf1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

net/ipv4/tcp_ipv4.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -458,23 +458,23 @@ static void tcp_ld_RTO_revert(struct sock *sk, u32 seq)
458458
*
459459
*/
460460

461-
int tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
461+
int tcp_v4_err(struct sk_buff *skb, u32 info)
462462
{
463-
const struct iphdr *iph = (const struct iphdr *)icmp_skb->data;
464-
struct tcphdr *th = (struct tcphdr *)(icmp_skb->data + (iph->ihl << 2));
463+
const struct iphdr *iph = (const struct iphdr *)skb->data;
464+
struct tcphdr *th = (struct tcphdr *)(skb->data + (iph->ihl << 2));
465465
struct tcp_sock *tp;
466466
struct inet_sock *inet;
467-
const int type = icmp_hdr(icmp_skb)->type;
468-
const int code = icmp_hdr(icmp_skb)->code;
467+
const int type = icmp_hdr(skb)->type;
468+
const int code = icmp_hdr(skb)->code;
469469
struct sock *sk;
470470
struct request_sock *fastopen;
471471
u32 seq, snd_una;
472472
int err;
473-
struct net *net = dev_net(icmp_skb->dev);
473+
struct net *net = dev_net(skb->dev);
474474

475475
sk = __inet_lookup_established(net, &tcp_hashinfo, iph->daddr,
476476
th->dest, iph->saddr, ntohs(th->source),
477-
inet_iif(icmp_skb), 0);
477+
inet_iif(skb), 0);
478478
if (!sk) {
479479
__ICMP_INC_STATS(net, ICMP_MIB_INERRORS);
480480
return -ENOENT;
@@ -524,7 +524,7 @@ int tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
524524
switch (type) {
525525
case ICMP_REDIRECT:
526526
if (!sock_owned_by_user(sk))
527-
do_redirect(icmp_skb, sk);
527+
do_redirect(skb, sk);
528528
goto out;
529529
case ICMP_SOURCE_QUENCH:
530530
/* Just silently ignore these. */
@@ -578,7 +578,7 @@ int tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
578578
if (fastopen && !fastopen->sk)
579579
break;
580580

581-
ip_icmp_error(sk, icmp_skb, err, th->dest, info, (u8 *)th);
581+
ip_icmp_error(sk, skb, err, th->dest, info, (u8 *)th);
582582

583583
if (!sock_owned_by_user(sk)) {
584584
sk->sk_err = err;

0 commit comments

Comments
 (0)