提交 4d1a2d9e 编写于 作者: D Damian Lukowski 提交者: David S. Miller

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: NDamian Lukowski <damian@tvk.rwth-aachen.de>
Acked-by: NIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6ee16520
...@@ -328,26 +328,26 @@ static void do_pmtu_discovery(struct sock *sk, struct iphdr *iph, u32 mtu) ...@@ -328,26 +328,26 @@ static void do_pmtu_discovery(struct sock *sk, struct iphdr *iph, u32 mtu)
* *
*/ */
void tcp_v4_err(struct sk_buff *skb, u32 info) void tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
{ {
struct iphdr *iph = (struct iphdr *)skb->data; struct iphdr *iph = (struct iphdr *)icmp_skb->data;
struct tcphdr *th = (struct tcphdr *)(skb->data + (iph->ihl << 2)); struct tcphdr *th = (struct tcphdr *)(icmp_skb->data + (iph->ihl << 2));
struct tcp_sock *tp; struct tcp_sock *tp;
struct inet_sock *inet; struct inet_sock *inet;
const int type = icmp_hdr(skb)->type; const int type = icmp_hdr(icmp_skb)->type;
const int code = icmp_hdr(skb)->code; const int code = icmp_hdr(icmp_skb)->code;
struct sock *sk; struct sock *sk;
__u32 seq; __u32 seq;
int err; int err;
struct net *net = dev_net(skb->dev); struct net *net = dev_net(icmp_skb->dev);
if (skb->len < (iph->ihl << 2) + 8) { if (icmp_skb->len < (iph->ihl << 2) + 8) {
ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS); ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS);
return; return;
} }
sk = inet_lookup(net, &tcp_hashinfo, iph->daddr, th->dest, sk = inet_lookup(net, &tcp_hashinfo, iph->daddr, th->dest,
iph->saddr, th->source, inet_iif(skb)); iph->saddr, th->source, inet_iif(icmp_skb));
if (!sk) { if (!sk) {
ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS); ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS);
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册