diff options
Diffstat (limited to 'include/net/dst.h')
-rw-r--r-- | include/net/dst.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 9261d928303d..1279f9b09791 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 sock *sk, struct sk_buff *skb); | 48 | int (*output)(struct net *net, 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 |
@@ -365,10 +365,10 @@ static inline void skb_tunnel_rx(struct sk_buff *skb, struct net_device *dev, | |||
365 | __skb_tunnel_rx(skb, dev, net); | 365 | __skb_tunnel_rx(skb, dev, net); |
366 | } | 366 | } |
367 | 367 | ||
368 | int dst_discard_sk(struct sock *sk, struct sk_buff *skb); | 368 | int dst_discard_out(struct net *net, struct sock *sk, struct sk_buff *skb); |
369 | static inline int dst_discard(struct sk_buff *skb) | 369 | static inline int dst_discard(struct sk_buff *skb) |
370 | { | 370 | { |
371 | return dst_discard_sk(skb->sk, skb); | 371 | return dst_discard_out(&init_net, skb->sk, skb); |
372 | } | 372 | } |
373 | void *dst_alloc(struct dst_ops *ops, struct net_device *dev, int initial_ref, | 373 | void *dst_alloc(struct dst_ops *ops, struct net_device *dev, int initial_ref, |
374 | int initial_obsolete, unsigned short flags); | 374 | int initial_obsolete, unsigned short flags); |
@@ -454,13 +454,9 @@ static inline void dst_set_expires(struct dst_entry *dst, int timeout) | |||
454 | } | 454 | } |
455 | 455 | ||
456 | /* Output packet to network from transport. */ | 456 | /* Output packet to network from transport. */ |
457 | static inline int dst_output_sk(struct sock *sk, struct sk_buff *skb) | 457 | static inline int dst_output(struct net *net, struct sock *sk, struct sk_buff *skb) |
458 | { | 458 | { |
459 | return skb_dst(skb)->output(sk, skb); | 459 | return skb_dst(skb)->output(net, sk, skb); |
460 | } | ||
461 | static inline int dst_output(struct sk_buff *skb) | ||
462 | { | ||
463 | return dst_output_sk(skb->sk, skb); | ||
464 | } | 460 | } |
465 | 461 | ||
466 | /* Input packet from network to transport. */ | 462 | /* Input packet from network to transport. */ |
@@ -489,7 +485,8 @@ struct flowi; | |||
489 | #ifndef CONFIG_XFRM | 485 | #ifndef CONFIG_XFRM |
490 | static inline struct dst_entry *xfrm_lookup(struct net *net, | 486 | static inline struct dst_entry *xfrm_lookup(struct net *net, |
491 | struct dst_entry *dst_orig, | 487 | struct dst_entry *dst_orig, |
492 | const struct flowi *fl, struct sock *sk, | 488 | const struct flowi *fl, |
489 | const struct sock *sk, | ||
493 | int flags) | 490 | int flags) |
494 | { | 491 | { |
495 | return dst_orig; | 492 | return dst_orig; |
@@ -498,7 +495,7 @@ static inline struct dst_entry *xfrm_lookup(struct net *net, | |||
498 | static inline struct dst_entry *xfrm_lookup_route(struct net *net, | 495 | static inline struct dst_entry *xfrm_lookup_route(struct net *net, |
499 | struct dst_entry *dst_orig, | 496 | struct dst_entry *dst_orig, |
500 | const struct flowi *fl, | 497 | const struct flowi *fl, |
501 | struct sock *sk, | 498 | const struct sock *sk, |
502 | int flags) | 499 | int flags) |
503 | { | 500 | { |
504 | return dst_orig; | 501 | return dst_orig; |
@@ -511,11 +508,11 @@ static inline struct xfrm_state *dst_xfrm(const struct dst_entry *dst) | |||
511 | 508 | ||
512 | #else | 509 | #else |
513 | struct dst_entry *xfrm_lookup(struct net *net, struct dst_entry *dst_orig, | 510 | struct dst_entry *xfrm_lookup(struct net *net, struct dst_entry *dst_orig, |
514 | const struct flowi *fl, struct sock *sk, | 511 | const struct flowi *fl, const struct sock *sk, |
515 | int flags); | 512 | int flags); |
516 | 513 | ||
517 | struct dst_entry *xfrm_lookup_route(struct net *net, struct dst_entry *dst_orig, | 514 | struct dst_entry *xfrm_lookup_route(struct net *net, struct dst_entry *dst_orig, |
518 | const struct flowi *fl, struct sock *sk, | 515 | const struct flowi *fl, const struct sock *sk, |
519 | int flags); | 516 | int flags); |
520 | 517 | ||
521 | /* skb attached with this dst needs transformation if dst->xfrm is valid */ | 518 | /* skb attached with this dst needs transformation if dst->xfrm is valid */ |