mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
net: skb->dst accessors
Define three accessors to get/set dst attached to a skb struct dst_entry *skb_dst(const struct sk_buff *skb) void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) void skb_dst_drop(struct sk_buff *skb) This one should replace occurrences of : dst_release(skb->dst) skb->dst = NULL; Delete skb->dst field Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
511c3f92ad
commit
adf30907d6
83 changed files with 414 additions and 390 deletions
|
@ -590,7 +590,7 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
|
|||
arg.csumoffset = offsetof(struct tcphdr, check) / 2;
|
||||
arg.flags = (sk && inet_sk(sk)->transparent) ? IP_REPLY_ARG_NOSRCCHECK : 0;
|
||||
|
||||
net = dev_net(skb->dst->dev);
|
||||
net = dev_net(skb_dst(skb)->dev);
|
||||
ip_send_reply(net->ipv4.tcp_sock, skb,
|
||||
&arg, arg.iov[0].iov_len);
|
||||
|
||||
|
@ -617,7 +617,7 @@ static void tcp_v4_send_ack(struct sk_buff *skb, u32 seq, u32 ack,
|
|||
];
|
||||
} rep;
|
||||
struct ip_reply_arg arg;
|
||||
struct net *net = dev_net(skb->dst->dev);
|
||||
struct net *net = dev_net(skb_dst(skb)->dev);
|
||||
|
||||
memset(&rep.th, 0, sizeof(struct tcphdr));
|
||||
memset(&arg, 0, sizeof(arg));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue