diff options
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index aad21819316d..b35d3bfc66cd 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -148,8 +148,10 @@ static unsigned int ipv4_mtu(const struct dst_entry *dst); | |||
148 | static void ipv4_dst_destroy(struct dst_entry *dst); | 148 | static void ipv4_dst_destroy(struct dst_entry *dst); |
149 | static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst); | 149 | static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst); |
150 | static void ipv4_link_failure(struct sk_buff *skb); | 150 | static void ipv4_link_failure(struct sk_buff *skb); |
151 | static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu); | 151 | static void ip_rt_update_pmtu(struct dst_entry *dst, struct sock *sk, |
152 | static void ip_do_redirect(struct dst_entry *dst, struct sk_buff *skb); | 152 | struct sk_buff *skb, u32 mtu); |
153 | static void ip_do_redirect(struct dst_entry *dst, struct sock *sk, | ||
154 | struct sk_buff *skb); | ||
153 | static int rt_garbage_collect(struct dst_ops *ops); | 155 | static int rt_garbage_collect(struct dst_ops *ops); |
154 | 156 | ||
155 | static void ipv4_dst_ifdown(struct dst_entry *dst, struct net_device *dev, | 157 | static void ipv4_dst_ifdown(struct dst_entry *dst, struct net_device *dev, |
@@ -1273,7 +1275,7 @@ static void rt_del(unsigned int hash, struct rtable *rt) | |||
1273 | spin_unlock_bh(rt_hash_lock_addr(hash)); | 1275 | spin_unlock_bh(rt_hash_lock_addr(hash)); |
1274 | } | 1276 | } |
1275 | 1277 | ||
1276 | static void ip_do_redirect(struct dst_entry *dst, struct sk_buff *skb) | 1278 | static void ip_do_redirect(struct dst_entry *dst, struct sock *sk, struct sk_buff *skb) |
1277 | { | 1279 | { |
1278 | __be32 new_gw = icmp_hdr(skb)->un.gateway; | 1280 | __be32 new_gw = icmp_hdr(skb)->un.gateway; |
1279 | __be32 old_gw = ip_hdr(skb)->saddr; | 1281 | __be32 old_gw = ip_hdr(skb)->saddr; |
@@ -1506,7 +1508,8 @@ out: kfree_skb(skb); | |||
1506 | return 0; | 1508 | return 0; |
1507 | } | 1509 | } |
1508 | 1510 | ||
1509 | static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu) | 1511 | static void ip_rt_update_pmtu(struct dst_entry *dst, struct sock *sk, |
1512 | struct sk_buff *skb, u32 mtu) | ||
1510 | { | 1513 | { |
1511 | struct rtable *rt = (struct rtable *) dst; | 1514 | struct rtable *rt = (struct rtable *) dst; |
1512 | 1515 | ||
@@ -1531,7 +1534,7 @@ void ipv4_update_pmtu(struct sk_buff *skb, struct net *net, u32 mtu, | |||
1531 | iph->daddr, iph->saddr, 0, 0); | 1534 | iph->daddr, iph->saddr, 0, 0); |
1532 | rt = __ip_route_output_key(net, &fl4); | 1535 | rt = __ip_route_output_key(net, &fl4); |
1533 | if (!IS_ERR(rt)) { | 1536 | if (!IS_ERR(rt)) { |
1534 | ip_rt_update_pmtu(&rt->dst, mtu); | 1537 | ip_rt_update_pmtu(&rt->dst, NULL, skb, mtu); |
1535 | ip_rt_put(rt); | 1538 | ip_rt_put(rt); |
1536 | } | 1539 | } |
1537 | } | 1540 | } |
@@ -1559,7 +1562,7 @@ void ipv4_redirect(struct sk_buff *skb, struct net *net, | |||
1559 | protocol, flow_flags, iph->daddr, iph->saddr, 0, 0); | 1562 | protocol, flow_flags, iph->daddr, iph->saddr, 0, 0); |
1560 | rt = __ip_route_output_key(net, &fl4); | 1563 | rt = __ip_route_output_key(net, &fl4); |
1561 | if (!IS_ERR(rt)) { | 1564 | if (!IS_ERR(rt)) { |
1562 | ip_do_redirect(&rt->dst, skb); | 1565 | ip_do_redirect(&rt->dst, NULL, skb); |
1563 | ip_rt_put(rt); | 1566 | ip_rt_put(rt); |
1564 | } | 1567 | } |
1565 | } | 1568 | } |
@@ -2587,11 +2590,13 @@ static unsigned int ipv4_blackhole_mtu(const struct dst_entry *dst) | |||
2587 | return mtu ? : dst->dev->mtu; | 2590 | return mtu ? : dst->dev->mtu; |
2588 | } | 2591 | } |
2589 | 2592 | ||
2590 | static void ipv4_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) | 2593 | static void ipv4_rt_blackhole_update_pmtu(struct dst_entry *dst, struct sock *sk, |
2594 | struct sk_buff *skb, u32 mtu) | ||
2591 | { | 2595 | { |
2592 | } | 2596 | } |
2593 | 2597 | ||
2594 | static void ipv4_rt_blackhole_redirect(struct dst_entry *dst, struct sk_buff *skb) | 2598 | static void ipv4_rt_blackhole_redirect(struct dst_entry *dst, struct sock *sk, |
2599 | struct sk_buff *skb) | ||
2595 | { | 2600 | { |
2596 | } | 2601 | } |
2597 | 2602 | ||