diff options
Diffstat (limited to 'include/net/dst.h')
-rw-r--r-- | include/net/dst.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 46ed958e0c6e..71c60f42be48 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -45,7 +45,7 @@ struct dst_entry { | |||
45 | void *__pad1; | 45 | void *__pad1; |
46 | #endif | 46 | #endif |
47 | int (*input)(struct sk_buff *); | 47 | int (*input)(struct sk_buff *); |
48 | int (*output)(struct sk_buff *); | 48 | int (*output)(struct sock *sk, struct sk_buff *skb); |
49 | 49 | ||
50 | unsigned short flags; | 50 | unsigned short flags; |
51 | #define DST_HOST 0x0001 | 51 | #define DST_HOST 0x0001 |
@@ -367,7 +367,11 @@ static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) | |||
367 | return child; | 367 | return child; |
368 | } | 368 | } |
369 | 369 | ||
370 | int dst_discard(struct sk_buff *skb); | 370 | int dst_discard_sk(struct sock *sk, struct sk_buff *skb); |
371 | static inline int dst_discard(struct sk_buff *skb) | ||
372 | { | ||
373 | return dst_discard_sk(skb->sk, skb); | ||
374 | } | ||
371 | void *dst_alloc(struct dst_ops *ops, struct net_device *dev, int initial_ref, | 375 | void *dst_alloc(struct dst_ops *ops, struct net_device *dev, int initial_ref, |
372 | int initial_obsolete, unsigned short flags); | 376 | int initial_obsolete, unsigned short flags); |
373 | void __dst_free(struct dst_entry *dst); | 377 | void __dst_free(struct dst_entry *dst); |
@@ -449,9 +453,13 @@ static inline void dst_set_expires(struct dst_entry *dst, int timeout) | |||
449 | } | 453 | } |
450 | 454 | ||
451 | /* Output packet to network from transport. */ | 455 | /* Output packet to network from transport. */ |
456 | static inline int dst_output_sk(struct sock *sk, struct sk_buff *skb) | ||
457 | { | ||
458 | return skb_dst(skb)->output(sk, skb); | ||
459 | } | ||
452 | static inline int dst_output(struct sk_buff *skb) | 460 | static inline int dst_output(struct sk_buff *skb) |
453 | { | 461 | { |
454 | return skb_dst(skb)->output(skb); | 462 | return dst_output_sk(skb->sk, skb); |
455 | } | 463 | } |
456 | 464 | ||
457 | /* Input packet from network to transport. */ | 465 | /* Input packet from network to transport. */ |