diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-06-02 01:19:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-03 05:51:04 -0400 |
commit | adf30907d63893e4208dfe3f5c88ae12bc2f25d5 (patch) | |
tree | 0f07542bb95de2ad537540868aba6cf87a86e17d /net/ipv4/tcp_ipv4.c | |
parent | 511c3f92ad5b6d9f8f6464be1b4f85f0422be91a (diff) |
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>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 319c88526449..5a1ca2698c88 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -590,7 +590,7 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb) | |||
590 | arg.csumoffset = offsetof(struct tcphdr, check) / 2; | 590 | arg.csumoffset = offsetof(struct tcphdr, check) / 2; |
591 | arg.flags = (sk && inet_sk(sk)->transparent) ? IP_REPLY_ARG_NOSRCCHECK : 0; | 591 | arg.flags = (sk && inet_sk(sk)->transparent) ? IP_REPLY_ARG_NOSRCCHECK : 0; |
592 | 592 | ||
593 | net = dev_net(skb->dst->dev); | 593 | net = dev_net(skb_dst(skb)->dev); |
594 | ip_send_reply(net->ipv4.tcp_sock, skb, | 594 | ip_send_reply(net->ipv4.tcp_sock, skb, |
595 | &arg, arg.iov[0].iov_len); | 595 | &arg, arg.iov[0].iov_len); |
596 | 596 | ||
@@ -617,7 +617,7 @@ static void tcp_v4_send_ack(struct sk_buff *skb, u32 seq, u32 ack, | |||
617 | ]; | 617 | ]; |
618 | } rep; | 618 | } rep; |
619 | struct ip_reply_arg arg; | 619 | struct ip_reply_arg arg; |
620 | struct net *net = dev_net(skb->dst->dev); | 620 | struct net *net = dev_net(skb_dst(skb)->dev); |
621 | 621 | ||
622 | memset(&rep.th, 0, sizeof(struct tcphdr)); | 622 | memset(&rep.th, 0, sizeof(struct tcphdr)); |
623 | memset(&arg, 0, sizeof(arg)); | 623 | memset(&arg, 0, sizeof(arg)); |