aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-08-08 14:15:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-08 14:15:23 -0400
commitf2d7499be1b1fe1cd8a5e6a01c1f44173894a241 (patch)
tree64d341a90d8cb831a5097e365d303367906f1373 /net/ipv4/route.c
parent8d659f5e43c5db2630e85f507b7384365e9e1c1e (diff)
parent76aab2c1eae491a5d73ac83deec97dd28ebac584 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (99 commits) pkt_sched: Fix actions referencing bnx2x: fix logical op tcp: (whitespace only) fix confusing indentation pkt_sched: Fix qdisc config when link is down. [Bluetooth] Add full quirk implementation for btusb driver [Bluetooth] Removal of unnecessary ignore module parameter [Bluetooth] Add parameters to control BNEP header compression ath9k: Revamp wireless mode usage ath9k: More unused macros ath9k: Remove a few unused macros and fix indentation ath9k: Use mac80211's band macros and remove enum hal_freq_band ath9k: Remove redundant data structure ath9k_txq_info ath9k: Cleanup data structures related to HW capabilities ath9k: work around gcc ICEs ath9k: Add new Atheros IEEE 802.11n driver ath5k: remove Atheros 11n devices from supported list list.h: add list_cut_position() list.h: Add list_splice_tail() and list_splice_tail_init() p54: swap short slot time dcf values rt2x00: Block all unsupported modes ...
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 1bfa078ddbd0..16fc6f454a31 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1509,14 +1509,14 @@ unsigned short ip_rt_frag_needed(struct net *net, struct iphdr *iph,
1509 1509
1510 /* BSD 4.2 compatibility hack :-( */ 1510 /* BSD 4.2 compatibility hack :-( */
1511 if (mtu == 0 && 1511 if (mtu == 0 &&
1512 old_mtu >= dst_metric(&rth->u.dst, RTAX_MTU) && 1512 old_mtu >= dst_mtu(&rth->u.dst) &&
1513 old_mtu >= 68 + (iph->ihl << 2)) 1513 old_mtu >= 68 + (iph->ihl << 2))
1514 old_mtu -= iph->ihl << 2; 1514 old_mtu -= iph->ihl << 2;
1515 1515
1516 mtu = guess_mtu(old_mtu); 1516 mtu = guess_mtu(old_mtu);
1517 } 1517 }
1518 if (mtu <= dst_metric(&rth->u.dst, RTAX_MTU)) { 1518 if (mtu <= dst_mtu(&rth->u.dst)) {
1519 if (mtu < dst_metric(&rth->u.dst, RTAX_MTU)) { 1519 if (mtu < dst_mtu(&rth->u.dst)) {
1520 dst_confirm(&rth->u.dst); 1520 dst_confirm(&rth->u.dst);
1521 if (mtu < ip_rt_min_pmtu) { 1521 if (mtu < ip_rt_min_pmtu) {
1522 mtu = ip_rt_min_pmtu; 1522 mtu = ip_rt_min_pmtu;
@@ -1538,7 +1538,7 @@ unsigned short ip_rt_frag_needed(struct net *net, struct iphdr *iph,
1538 1538
1539static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu) 1539static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu)
1540{ 1540{
1541 if (dst_metric(dst, RTAX_MTU) > mtu && mtu >= 68 && 1541 if (dst_mtu(dst) > mtu && mtu >= 68 &&
1542 !(dst_metric_locked(dst, RTAX_MTU))) { 1542 !(dst_metric_locked(dst, RTAX_MTU))) {
1543 if (mtu < ip_rt_min_pmtu) { 1543 if (mtu < ip_rt_min_pmtu) {
1544 mtu = ip_rt_min_pmtu; 1544 mtu = ip_rt_min_pmtu;
@@ -1667,7 +1667,7 @@ static void rt_set_nexthop(struct rtable *rt, struct fib_result *res, u32 itag)
1667 1667
1668 if (dst_metric(&rt->u.dst, RTAX_HOPLIMIT) == 0) 1668 if (dst_metric(&rt->u.dst, RTAX_HOPLIMIT) == 0)
1669 rt->u.dst.metrics[RTAX_HOPLIMIT-1] = sysctl_ip_default_ttl; 1669 rt->u.dst.metrics[RTAX_HOPLIMIT-1] = sysctl_ip_default_ttl;
1670 if (dst_metric(&rt->u.dst, RTAX_MTU) > IP_MAX_MTU) 1670 if (dst_mtu(&rt->u.dst) > IP_MAX_MTU)
1671 rt->u.dst.metrics[RTAX_MTU-1] = IP_MAX_MTU; 1671 rt->u.dst.metrics[RTAX_MTU-1] = IP_MAX_MTU;
1672 if (dst_metric(&rt->u.dst, RTAX_ADVMSS) == 0) 1672 if (dst_metric(&rt->u.dst, RTAX_ADVMSS) == 0)
1673 rt->u.dst.metrics[RTAX_ADVMSS-1] = max_t(unsigned int, rt->u.dst.dev->mtu - 40, 1673 rt->u.dst.metrics[RTAX_ADVMSS-1] = max_t(unsigned int, rt->u.dst.dev->mtu - 40,
@@ -3223,9 +3223,7 @@ int __init ip_rt_init(void)
3223 */ 3223 */
3224void __init ip_static_sysctl_init(void) 3224void __init ip_static_sysctl_init(void)
3225{ 3225{
3226#ifdef CONFIG_SYSCTL
3227 register_sysctl_paths(ipv4_route_path, ipv4_route_table); 3226 register_sysctl_paths(ipv4_route_path, ipv4_route_table);
3228#endif
3229} 3227}
3230#endif 3228#endif
3231 3229