aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_policy.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-17 06:29:28 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-17 06:29:28 -0400
commit6700c2709c08d74ae2c3c29b84a30da012dbc7f1 (patch)
tree1d44f300ec3cf5f9845fba7a25491e33d666426f /net/ipv4/xfrm4_policy.c
parent02f3d4ce9e81434a365f4643020b0402f6fe3332 (diff)
net: Pass optional SKB and SK arguments to dst_ops->{update_pmtu,redirect}()
This will be used so that we can compose a full flow key. Even though we have a route in this context, we need more. In the future the routes will be without destination address, source address, etc. keying. One ipv4 route will cover entire subnets, etc. In this environment we have to have a way to possess persistent storage for redirects and PMTU information. This persistent storage will exist in the FIB tables, and that's why we'll need to be able to rebuild a full lookup flow key here. Using that flow key will do a fib_lookup() and create/update the persistent entry. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/xfrm4_policy.c')
-rw-r--r--net/ipv4/xfrm4_policy.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index 737131cef375..fcf7678bc009 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -194,20 +194,22 @@ static inline int xfrm4_garbage_collect(struct dst_ops *ops)
194 return (dst_entries_get_slow(ops) > ops->gc_thresh * 2); 194 return (dst_entries_get_slow(ops) > ops->gc_thresh * 2);
195} 195}
196 196
197static void xfrm4_update_pmtu(struct dst_entry *dst, u32 mtu) 197static void xfrm4_update_pmtu(struct dst_entry *dst, struct sock *sk,
198 struct sk_buff *skb, u32 mtu)
198{ 199{
199 struct xfrm_dst *xdst = (struct xfrm_dst *)dst; 200 struct xfrm_dst *xdst = (struct xfrm_dst *)dst;
200 struct dst_entry *path = xdst->route; 201 struct dst_entry *path = xdst->route;
201 202
202 path->ops->update_pmtu(path, mtu); 203 path->ops->update_pmtu(path, sk, skb, mtu);
203} 204}
204 205
205static void xfrm4_redirect(struct dst_entry *dst, struct sk_buff *skb) 206static void xfrm4_redirect(struct dst_entry *dst, struct sock *sk,
207 struct sk_buff *skb)
206{ 208{
207 struct xfrm_dst *xdst = (struct xfrm_dst *)dst; 209 struct xfrm_dst *xdst = (struct xfrm_dst *)dst;
208 struct dst_entry *path = xdst->route; 210 struct dst_entry *path = xdst->route;
209 211
210 path->ops->redirect(path, skb); 212 path->ops->redirect(path, sk, skb);
211} 213}
212 214
213static void xfrm4_dst_destroy(struct dst_entry *dst) 215static void xfrm4_dst_destroy(struct dst_entry *dst)