diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-20 20:43:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-20 20:43:29 -0400 |
commit | db6d8c7a4027b48d797b369a53f8470aaeed7063 (patch) | |
tree | e140c104a89abc2154e1f41a7db8ebecbb6fa0b4 /net/ipv4/fib_frontend.c | |
parent | 3a533374283aea50eab3976d8a6d30532175f009 (diff) | |
parent | fb65a7c091529bfffb1262515252c0d0f6241c5c (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: (1232 commits)
iucv: Fix bad merging.
net_sched: Add size table for qdiscs
net_sched: Add accessor function for packet length for qdiscs
net_sched: Add qdisc_enqueue wrapper
highmem: Export totalhigh_pages.
ipv6 mcast: Omit redundant address family checks in ip6_mc_source().
net: Use standard structures for generic socket address structures.
ipv6 netns: Make several "global" sysctl variables namespace aware.
netns: Use net_eq() to compare net-namespaces for optimization.
ipv6: remove unused macros from net/ipv6.h
ipv6: remove unused parameter from ip6_ra_control
tcp: fix kernel panic with listening_get_next
tcp: Remove redundant checks when setting eff_sacks
tcp: options clean up
tcp: Fix MD5 signatures for non-linear skbs
sctp: Update sctp global memory limit allocations.
sctp: remove unnecessary byteshifting, calculate directly in big-endian
sctp: Allow only 1 listening socket with SO_REUSEADDR
sctp: Do not leak memory on multiple listen() calls
sctp: Support ipv6only AF_INET6 sockets.
...
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r-- | net/ipv4/fib_frontend.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 0b2ac6a3d903..65c1503f8cc8 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -5,8 +5,6 @@ | |||
5 | * | 5 | * |
6 | * IPv4 Forwarding Information Base: FIB frontend. | 6 | * IPv4 Forwarding Information Base: FIB frontend. |
7 | * | 7 | * |
8 | * Version: $Id: fib_frontend.c,v 1.26 2001/10/31 21:55:54 davem Exp $ | ||
9 | * | ||
10 | * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> | 8 | * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> |
11 | * | 9 | * |
12 | * This program is free software; you can redistribute it and/or | 10 | * This program is free software; you can redistribute it and/or |
@@ -146,7 +144,7 @@ static void fib_flush(struct net *net) | |||
146 | } | 144 | } |
147 | 145 | ||
148 | if (flushed) | 146 | if (flushed) |
149 | rt_cache_flush(-1); | 147 | rt_cache_flush(net, -1); |
150 | } | 148 | } |
151 | 149 | ||
152 | /* | 150 | /* |
@@ -899,21 +897,22 @@ static void fib_disable_ip(struct net_device *dev, int force) | |||
899 | { | 897 | { |
900 | if (fib_sync_down_dev(dev, force)) | 898 | if (fib_sync_down_dev(dev, force)) |
901 | fib_flush(dev_net(dev)); | 899 | fib_flush(dev_net(dev)); |
902 | rt_cache_flush(0); | 900 | rt_cache_flush(dev_net(dev), 0); |
903 | arp_ifdown(dev); | 901 | arp_ifdown(dev); |
904 | } | 902 | } |
905 | 903 | ||
906 | static int fib_inetaddr_event(struct notifier_block *this, unsigned long event, void *ptr) | 904 | static int fib_inetaddr_event(struct notifier_block *this, unsigned long event, void *ptr) |
907 | { | 905 | { |
908 | struct in_ifaddr *ifa = (struct in_ifaddr*)ptr; | 906 | struct in_ifaddr *ifa = (struct in_ifaddr*)ptr; |
907 | struct net_device *dev = ifa->ifa_dev->dev; | ||
909 | 908 | ||
910 | switch (event) { | 909 | switch (event) { |
911 | case NETDEV_UP: | 910 | case NETDEV_UP: |
912 | fib_add_ifaddr(ifa); | 911 | fib_add_ifaddr(ifa); |
913 | #ifdef CONFIG_IP_ROUTE_MULTIPATH | 912 | #ifdef CONFIG_IP_ROUTE_MULTIPATH |
914 | fib_sync_up(ifa->ifa_dev->dev); | 913 | fib_sync_up(dev); |
915 | #endif | 914 | #endif |
916 | rt_cache_flush(-1); | 915 | rt_cache_flush(dev_net(dev), -1); |
917 | break; | 916 | break; |
918 | case NETDEV_DOWN: | 917 | case NETDEV_DOWN: |
919 | fib_del_ifaddr(ifa); | 918 | fib_del_ifaddr(ifa); |
@@ -921,9 +920,9 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event, | |||
921 | /* Last address was deleted from this interface. | 920 | /* Last address was deleted from this interface. |
922 | Disable IP. | 921 | Disable IP. |
923 | */ | 922 | */ |
924 | fib_disable_ip(ifa->ifa_dev->dev, 1); | 923 | fib_disable_ip(dev, 1); |
925 | } else { | 924 | } else { |
926 | rt_cache_flush(-1); | 925 | rt_cache_flush(dev_net(dev), -1); |
927 | } | 926 | } |
928 | break; | 927 | break; |
929 | } | 928 | } |
@@ -951,14 +950,14 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo | |||
951 | #ifdef CONFIG_IP_ROUTE_MULTIPATH | 950 | #ifdef CONFIG_IP_ROUTE_MULTIPATH |
952 | fib_sync_up(dev); | 951 | fib_sync_up(dev); |
953 | #endif | 952 | #endif |
954 | rt_cache_flush(-1); | 953 | rt_cache_flush(dev_net(dev), -1); |
955 | break; | 954 | break; |
956 | case NETDEV_DOWN: | 955 | case NETDEV_DOWN: |
957 | fib_disable_ip(dev, 0); | 956 | fib_disable_ip(dev, 0); |
958 | break; | 957 | break; |
959 | case NETDEV_CHANGEMTU: | 958 | case NETDEV_CHANGEMTU: |
960 | case NETDEV_CHANGE: | 959 | case NETDEV_CHANGE: |
961 | rt_cache_flush(0); | 960 | rt_cache_flush(dev_net(dev), 0); |
962 | break; | 961 | break; |
963 | } | 962 | } |
964 | return NOTIFY_DONE; | 963 | return NOTIFY_DONE; |