diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-01 05:06:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-01 05:06:29 -0500 |
commit | cec03afcb62fbbb0eaf943f6349ade61b89d7d40 (patch) | |
tree | cc80c13e373337d1c1dee9dd7269173da1f7c079 /net/ipv4/fib_frontend.c | |
parent | 2da53b0134ad41b91556d2d2a322cc03487a1ab7 (diff) | |
parent | 4814bdbd590e835ecec2d5e505165ec1c19796b2 (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: (173 commits)
[NETNS]: Lookup in FIB semantic hashes taking into account the namespace.
[NETNS]: Add a namespace mark to fib_info.
[IPV4]: fib_sync_down rework.
[NETNS]: Process interface address manipulation routines in the namespace.
[IPV4]: Small style cleanup of the error path in rtm_to_ifaddr.
[IPV4]: Fix memory leak on error path during FIB initialization.
[NETFILTER]: Ipv6-related xt_hashlimit compilation fix.
[NET_SCHED]: Add flow classifier
[NET_SCHED]: sch_sfq: make internal queues visible as classes
[NET_SCHED]: sch_sfq: add support for external classifiers
[NET_SCHED]: Constify struct tcf_ext_map
[BLUETOOTH]: Fix bugs in previous conn add/del workqueue changes.
[TCP]: Unexport sysctl_tcp_tso_win_divisor
[IPV4]: Make struct ipv4_devconf static.
[TR] net/802/tr.c: sysctl_tr_rif_timeout static
[XFRM]: Fix statistics.
[XFRM]: Remove unused exports.
[PKT_SCHED] sch_teql.c: Duplicate IFF_BROADCAST in FMASK, remove 2nd.
[BNX2]: Fix ASYM PAUSE advertisement for remote PHY.
[IPV4] route cache: Introduce rt_genid for smooth cache invalidation
...
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r-- | net/ipv4/fib_frontend.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index d28261826bc2..86ff2711fc95 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -808,7 +808,7 @@ static void fib_del_ifaddr(struct in_ifaddr *ifa) | |||
808 | First of all, we scan fib_info list searching | 808 | First of all, we scan fib_info list searching |
809 | for stray nexthop entries, then ignite fib_flush. | 809 | for stray nexthop entries, then ignite fib_flush. |
810 | */ | 810 | */ |
811 | if (fib_sync_down(ifa->ifa_local, NULL, 0)) | 811 | if (fib_sync_down_addr(dev->nd_net, ifa->ifa_local)) |
812 | fib_flush(dev->nd_net); | 812 | fib_flush(dev->nd_net); |
813 | } | 813 | } |
814 | } | 814 | } |
@@ -898,7 +898,7 @@ static void nl_fib_lookup_exit(struct net *net) | |||
898 | 898 | ||
899 | static void fib_disable_ip(struct net_device *dev, int force) | 899 | static void fib_disable_ip(struct net_device *dev, int force) |
900 | { | 900 | { |
901 | if (fib_sync_down(0, dev, force)) | 901 | if (fib_sync_down_dev(dev, force)) |
902 | fib_flush(dev->nd_net); | 902 | fib_flush(dev->nd_net); |
903 | rt_cache_flush(0); | 903 | rt_cache_flush(0); |
904 | arp_ifdown(dev); | 904 | arp_ifdown(dev); |
@@ -975,6 +975,7 @@ static struct notifier_block fib_netdev_notifier = { | |||
975 | 975 | ||
976 | static int __net_init ip_fib_net_init(struct net *net) | 976 | static int __net_init ip_fib_net_init(struct net *net) |
977 | { | 977 | { |
978 | int err; | ||
978 | unsigned int i; | 979 | unsigned int i; |
979 | 980 | ||
980 | net->ipv4.fib_table_hash = kzalloc( | 981 | net->ipv4.fib_table_hash = kzalloc( |
@@ -985,7 +986,14 @@ static int __net_init ip_fib_net_init(struct net *net) | |||
985 | for (i = 0; i < FIB_TABLE_HASHSZ; i++) | 986 | for (i = 0; i < FIB_TABLE_HASHSZ; i++) |
986 | INIT_HLIST_HEAD(&net->ipv4.fib_table_hash[i]); | 987 | INIT_HLIST_HEAD(&net->ipv4.fib_table_hash[i]); |
987 | 988 | ||
988 | return fib4_rules_init(net); | 989 | err = fib4_rules_init(net); |
990 | if (err < 0) | ||
991 | goto fail; | ||
992 | return 0; | ||
993 | |||
994 | fail: | ||
995 | kfree(net->ipv4.fib_table_hash); | ||
996 | return err; | ||
989 | } | 997 | } |
990 | 998 | ||
991 | static void __net_exit ip_fib_net_exit(struct net *net) | 999 | static void __net_exit ip_fib_net_exit(struct net *net) |