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>
This commit is contained in:
@@ -609,10 +609,10 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
|
||||
if (rel_info > dst_mtu(skb_dst(skb2)))
|
||||
goto out;
|
||||
|
||||
skb_dst(skb2)->ops->update_pmtu(skb_dst(skb2), rel_info);
|
||||
skb_dst(skb2)->ops->update_pmtu(skb_dst(skb2), NULL, skb2, rel_info);
|
||||
}
|
||||
if (rel_type == ICMP_REDIRECT)
|
||||
skb_dst(skb2)->ops->redirect(skb_dst(skb2), skb2);
|
||||
skb_dst(skb2)->ops->redirect(skb_dst(skb2), NULL, skb2);
|
||||
|
||||
icmp_send(skb2, rel_type, rel_code, htonl(rel_info));
|
||||
|
||||
@@ -952,7 +952,7 @@ static int ip6_tnl_xmit2(struct sk_buff *skb,
|
||||
if (mtu < IPV6_MIN_MTU)
|
||||
mtu = IPV6_MIN_MTU;
|
||||
if (skb_dst(skb))
|
||||
skb_dst(skb)->ops->update_pmtu(skb_dst(skb), mtu);
|
||||
skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, mtu);
|
||||
if (skb->len > mtu) {
|
||||
*pmtu = mtu;
|
||||
err = -EMSGSIZE;
|
||||
|
Reference in New Issue
Block a user