Skip to content

Commit 4d1a2d9

Browse files
Damian Lukowskidavem330
authored andcommitted
Revert Backoff [v3]: Rename skb to icmp_skb in tcp_v4_err()
This supplementary patch renames skb to icmp_skb in tcp_v4_err() in order to disambiguate from another sk_buff variable, which will be introduced in a separate patch. Signed-off-by: Damian Lukowski <[email protected]> Acked-by: Ilpo Järvinen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6ee1652 commit 4d1a2d9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

net/ipv4/tcp_ipv4.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -328,26 +328,26 @@ static void do_pmtu_discovery(struct sock *sk, struct iphdr *iph, u32 mtu)
328328
*
329329
*/
330330

331-
void tcp_v4_err(struct sk_buff *skb, u32 info)
331+
void tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
332332
{
333-
struct iphdr *iph = (struct iphdr *)skb->data;
334-
struct tcphdr *th = (struct tcphdr *)(skb->data + (iph->ihl << 2));
333+
struct iphdr *iph = (struct iphdr *)icmp_skb->data;
334+
struct tcphdr *th = (struct tcphdr *)(icmp_skb->data + (iph->ihl << 2));
335335
struct tcp_sock *tp;
336336
struct inet_sock *inet;
337-
const int type = icmp_hdr(skb)->type;
338-
const int code = icmp_hdr(skb)->code;
337+
const int type = icmp_hdr(icmp_skb)->type;
338+
const int code = icmp_hdr(icmp_skb)->code;
339339
struct sock *sk;
340340
__u32 seq;
341341
int err;
342-
struct net *net = dev_net(skb->dev);
342+
struct net *net = dev_net(icmp_skb->dev);
343343

344-
if (skb->len < (iph->ihl << 2) + 8) {
344+
if (icmp_skb->len < (iph->ihl << 2) + 8) {
345345
ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS);
346346
return;
347347
}
348348

349349
sk = inet_lookup(net, &tcp_hashinfo, iph->daddr, th->dest,
350-
iph->saddr, th->source, inet_iif(skb));
350+
iph->saddr, th->source, inet_iif(icmp_skb));
351351
if (!sk) {
352352
ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS);
353353
return;

0 commit comments

Comments
 (0)