aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/route.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-06-15 01:21:46 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-15 01:22:07 -0400
commit36393395536064e483b73d173f6afc103eadfbc4 (patch)
treeb45113cce1bdfc4be92a856700690a253f1bb088 /include/net/route.h
parentb3908e22ad8bb6074934496ef171fd83605d7d3e (diff)
ipv4: Handle PMTU in all ICMP error handlers.
With ip_rt_frag_needed() removed, we have to explicitly update PMTU information in every ICMP error handler. Create two helper functions to facilitate this. 1) ipv4_sk_update_pmtu() This updates the PMTU when we have a socket context to work with. 2) ipv4_update_pmtu() Raw version, used when no socket context is available. For this interface, we essentially just pass in explicit arguments for the flow identity information we would have extracted from the socket. And you'll notice that ipv4_sk_update_pmtu() is simply implemented in terms of ipv4_update_pmtu() Note that __ip_route_output_key() is used, rather than something like ip_route_output_flow() or ip_route_output_key(). This is because we absolutely do not want to end up with a route that does IPSEC encapsulation and the like. Instead, we only want the route that would get us to the node described by the outermost IP header. Reported-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/route.h')
-rw-r--r--include/net/route.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/net/route.h b/include/net/route.h
index a36ae429ed5d..47eb25ac1f7f 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -215,7 +215,10 @@ static inline int ip_route_input_noref(struct sk_buff *skb, __be32 dst, __be32 s
215 return ip_route_input_common(skb, dst, src, tos, devin, true); 215 return ip_route_input_common(skb, dst, src, tos, devin, true);
216} 216}
217 217
218extern void ip_rt_send_redirect(struct sk_buff *skb); 218extern void ipv4_update_pmtu(struct sk_buff *skb, struct net *net, u32 mtu,
219 int oif, u32 mark, u8 protocol, int flow_flags);
220extern void ipv4_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, u32 mtu);
221extern void ip_rt_send_redirect(struct sk_buff *skb);
219 222
220extern unsigned int inet_addr_type(struct net *net, __be32 addr); 223extern unsigned int inet_addr_type(struct net *net, __be32 addr);
221extern unsigned int inet_dev_addr_type(struct net *net, const struct net_device *dev, __be32 addr); 224extern unsigned int inet_dev_addr_type(struct net *net, const struct net_device *dev, __be32 addr);