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/xfrm4_mode_tunnel.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/xfrm4_mode_tunnel.c')
-rw-r--r-- | net/ipv4/xfrm4_mode_tunnel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/xfrm4_mode_tunnel.c b/net/ipv4/xfrm4_mode_tunnel.c index 7135279f3f84..3444f3b34eca 100644 --- a/net/ipv4/xfrm4_mode_tunnel.c +++ b/net/ipv4/xfrm4_mode_tunnel.c | |||
@@ -28,7 +28,7 @@ static inline void ipip_ecn_decapsulate(struct sk_buff *skb) | |||
28 | */ | 28 | */ |
29 | static int xfrm4_mode_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) | 29 | static int xfrm4_mode_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) |
30 | { | 30 | { |
31 | struct dst_entry *dst = skb->dst; | 31 | struct dst_entry *dst = skb_dst(skb); |
32 | struct iphdr *top_iph; | 32 | struct iphdr *top_iph; |
33 | int flags; | 33 | int flags; |
34 | 34 | ||
@@ -41,7 +41,7 @@ static int xfrm4_mode_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) | |||
41 | top_iph->ihl = 5; | 41 | top_iph->ihl = 5; |
42 | top_iph->version = 4; | 42 | top_iph->version = 4; |
43 | 43 | ||
44 | top_iph->protocol = xfrm_af2proto(skb->dst->ops->family); | 44 | top_iph->protocol = xfrm_af2proto(skb_dst(skb)->ops->family); |
45 | 45 | ||
46 | /* DS disclosed */ | 46 | /* DS disclosed */ |
47 | top_iph->tos = INET_ECN_encapsulate(XFRM_MODE_SKB_CB(skb)->tos, | 47 | top_iph->tos = INET_ECN_encapsulate(XFRM_MODE_SKB_CB(skb)->tos, |