diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-02 21:52:24 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-05 01:04:01 -0700 |
commit | f894cbf847c9bea1955095bf37aca6c050553167 (patch) | |
tree | 9cc63b36c2d299bba95ea90213f4a9ef0ae433d6 /include/net | |
parent | 5110effee8fde2edfacac9cd12a9960ab2dc39ea (diff) | |
download | op-kernel-dev-f894cbf847c9bea1955095bf37aca6c050553167.zip op-kernel-dev-f894cbf847c9bea1955095bf37aca6c050553167.tar.gz |
net: Add optional SKB arg to dst_ops->neigh_lookup().
Causes the handler to use the daddr in the ipv4/ipv6 header when
the route gateway is unspecified (local subnet).
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/dst.h | 8 | ||||
-rw-r--r-- | include/net/dst_ops.h | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 84e7a3f..295a705 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -420,7 +420,13 @@ static inline int dst_neigh_output(struct dst_entry *dst, struct neighbour *n, static inline struct neighbour *dst_neigh_lookup(const struct dst_entry *dst, const void *daddr) { - return dst->ops->neigh_lookup(dst, daddr); + return dst->ops->neigh_lookup(dst, NULL, daddr); +} + +static inline struct neighbour *dst_neigh_lookup_skb(const struct dst_entry *dst, + struct sk_buff *skb) +{ + return dst->ops->neigh_lookup(dst, skb, NULL); } static inline void dst_link_failure(struct sk_buff *skb) diff --git a/include/net/dst_ops.h b/include/net/dst_ops.h index 3682a0a..4badc86 100644 --- a/include/net/dst_ops.h +++ b/include/net/dst_ops.h @@ -26,7 +26,9 @@ struct dst_ops { void (*link_failure)(struct sk_buff *); void (*update_pmtu)(struct dst_entry *dst, u32 mtu); int (*local_out)(struct sk_buff *skb); - struct neighbour * (*neigh_lookup)(const struct dst_entry *dst, const void *daddr); + struct neighbour * (*neigh_lookup)(const struct dst_entry *dst, + struct sk_buff *skb, + const void *daddr); struct kmem_cache *kmem_cachep; |