summaryrefslogtreecommitdiffstats
path: root/net/ipv6
Commit message (Collapse)AuthorAgeFilesLines
* list_for_each_rcu must die: networkingPaul E. McKenney2008-07-251-6/+3
| | | | | | | | | | | | All uses of list_for_each_rcu() can be profitably replaced by the easier-to-use list_for_each_entry_rcu(). This patch makes this change for networking, in preparation for removing the list_for_each_rcu() API entirely. Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* netfilter: make security table depend on NETFILTER_ADVANCEDPatrick McHardy2008-07-231-1/+1
| | | | | Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: icmp6_dst_gc return changeStephen Hemminger2008-07-222-8/+5
| | | | | | | | Change icmp6_dst_gc to return the one value the caller cares about rather than using call by reference. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: use kcallocStephen Hemminger2008-07-221-3/+3
| | | | | | | Th fib_table_hash is an array, so use kcalloc. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: use spin_trylock_bhStephen Hemminger2008-07-221-3/+1
| | | | | | | Now there is spin_trylock_bh, use it rather than open coding. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: use round_jiffiesStephen Hemminger2008-07-221-2/+3
| | | | | | | | | This timer normally happens once a minute, there is no need to cause an early wakeup for it, so align it to next second boundary to safe power. It can't be deferred because then it could take too long on cleanup or DoS. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netns: dont alloc ipv6 fib timer listStephen Hemminger2008-07-221-27/+13
| | | | | | | | FIB timer list is a trivial size structure, avoid indirection and just put it in existing ns. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: make struct ipv6_devconf staticAdrian Bunk2008-07-221-1/+1
| | | | | | | struct ipv6_devconf can now become static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: use timer pendingStephen Hemminger2008-07-211-6/+6
| | | | | | | | | This fixes the bridge reference count problem and cleanups ipv6 FIB timer management. Don't use expires field, because it is not a proper way to test, instead use timer_pending(). Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: Fix warning in addrconf code.David Miller2008-07-201-2/+1
| | | | | | | Reported by Linus. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ipv6 mcast: Omit redundant address family checks in ip6_mc_source().YOSHIFUJI Hideaki2008-07-191-4/+0
| | | | | | | The caller has alredy checked for them. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6 netns: Make several "global" sysctl variables namespace aware.YOSHIFUJI Hideaki2008-07-199-16/+21
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* netns: Use net_eq() to compare net-namespaces for optimization.YOSHIFUJI Hideaki2008-07-193-3/+3
| | | | | | | | Without CONFIG_NET_NS, namespace is always &init_net. Compiler will be able to omit namespace comparisons with this patch. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: remove unused parameter from ip6_ra_controlDenis V. Lunev2008-07-192-6/+3
| | | | | Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: Fix MD5 signatures for non-linear skbsAdam Langley2008-07-191-44/+83
| | | | | | | | | | | | | | | | | Currently, the MD5 code assumes that the SKBs are linear and, in the case that they aren't, happily goes off and hashes off the end of the SKB and into random memory. Reported by Stephen Hemminger in [1]. Advice thanks to Stephen and Evgeniy Polyakov. Also includes a couple of missed route_caps from Stephen's patch in [2]. [1] http://marc.info/?l=linux-netdev&m=121445989106145&w=2 [2] http://marc.info/?l=linux-netdev&m=121459157816964&w=2 Signed-off-by: Adam Langley <agl@imperialviolet.org> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* proc: consolidate per-net single-release callersPavel Emelyanov2008-07-182-27/+3
| | | | | | | They are symmetrical to single_open ones :) Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* proc: consolidate per-net single_open callersPavel Emelyanov2008-07-182-42/+3
| | | | | | | There are already 7 of them - time to kill some duplicate code. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: add net to NET_INC_STATS_BHPavel Emelyanov2008-07-163-10/+10
| | | | | Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* inet: prepare net on the stack for NET accounting macrosPavel Emelyanov2008-07-161-1/+2
| | | | | Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mib: add net to TCP_INC_STATS_BHPavel Emelyanov2008-07-161-7/+7
| | | | | | | | | Same as before - the sock is always there to get the net from, but there are also some places with the net already saved on the stack. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* inet: prepare struct net for TCP MIB accountingPavel Emelyanov2008-07-161-1/+2
| | | | | | | | | This is the same as the first patch in the set, but preparing the net for TCP_XXX_STATS - save the struct net on the stack where required and possible. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: Fix using after dev_put()Wang Chen2008-07-141-3/+5
| | | | | | | Patrick McHardy pointed it out. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: Check return of dev_set_allmultiWang Chen2008-07-141-2/+9
| | | | | | | | | | | | allmulti might overflow. Commit: "netdevice: Fix promiscuity and allmulti overflow" in net-next makes dev_set_promiscuity/allmulti return error number if overflow happened. Here, we check the positive increment for allmulti to get error return. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2008-07-141-1/+1
|\ | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: net/netfilter/nf_conntrack_proto_tcp.c
| * ipv6: missed namespace context in ipv6_rthdr_rcvDenis V. Lunev2008-07-101-1/+1
| | | | | | | | | | Signed-off-by: Denis V. Lunev <den@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | pkt_sched: Add qdisc_tx_is_noop() helper and use in IPV6.David S. Miller2008-07-081-3/+2
| | | | | | | | | | | | | | This indicates if the NOOP scheduler is what is active for TX on a given device. Signed-off-by: David S. Miller <davem@davemloft.net>
* | netdev: Move rest of qdisc state into struct netdev_queueDavid S. Miller2008-07-081-1/+2
| | | | | | | | | | | | Now qdisc, qdisc_sleeping, and qdisc_list also live there. Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'master' of ↵David S. Miller2008-07-081-2/+2
|\ \ | |/ | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-3945.c net/mac80211/mlme.c
| * ipv6: fix race between ipv6_del_addr and DAD timerAndrey Vagin2008-07-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider the following scenario: ipv6_del_addr(ifp) ipv6_ifa_notify(RTM_DELADDR, ifp) ip6_del_rt(ifp->rt) after returning from the ipv6_ifa_notify and enabling BH-s back, but *before* calling the addrconf_del_timer the ifp->timer fires and: addrconf_dad_timer(ifp) addrconf_dad_completed(ifp) ipv6_ifa_notify(RTM_NEWADDR, ifp) ip6_ins_rt(ifp->rt) then return back to the ipv6_del_addr and: in6_ifa_put(ifp) inet6_ifa_finish_destroy(ifp) dst_release(&ifp->rt->u.dst) After this we have an ifp->rt inserted into fib6 lists, but queued for gc, which in turn can result in oopses in the fib6_run_gc. Maybe some other nasty things, but we caught only the oops in gc so far. The solution is to disarm the ifp->timer before flushing the rt from it. Signed-off-by: Andrey Vagin <avagin@parallels.com> Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | netfilter: ip6table_filter in netns for realAlexey Dobriyan2008-07-081-9/+22
| | | | | | | | | | | | | | | | | | One still needs to remove checks in nf_hook_slow() and nf_sockopt_find() to test this, though. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | netfilter: use correct namespace in ip6table_securityAlexey Dobriyan2008-07-081-3/+3
| | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@parallels.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | MIB: add struct net to UDP6_INC_STATS_BHPavel Emelyanov2008-07-051-6/+7
| | | | | | | | | | | | Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | MIB: add struct net to UDP6_INC_STATS_USERPavel Emelyanov2008-07-051-4/+7
| | | | | | | | | | | | | | | | As simple as the patch #1 in this set. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ipv4,ipv6 mroute: Add some helper inline functions to remove ugly ifdefs.YOSHIFUJI Hideaki2008-07-031-8/+0
| | | | | | | | | | | | | | ip{,v6}_mroute_{set,get}sockopt() should not matter by optimization but it would be better not to depend on optimization semantically. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* | ipv6: Do cleanup for ip6_mr_init.Wang Chen2008-07-032-6/+43
| | | | | | | | | | | | | | | | | | If do not do it, we will get following issues: 1. Leaving junks after inet6_init failing halfway. 2. Leaving proc and notifier junks after ipv6 modules unloading. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* | ipv6 route: Prefer outgoing interface with source address assigned.YOSHIFUJI Hideaki2008-07-031-4/+16
| | | | | | | | | | | | | | | | | | Outgoing interface is selected by the route decision if unspecified. Let's prefer routes via interface(s) with the address assigned if we have multiple routes with same cost. With help from Naohiro Ooiwa <nooiwa@miraclelinux.com>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* | ipv6 addrconf: add accept_dad sysctl to control DAD operation.YOSHIFUJI Hideaki2008-07-031-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | - If 0, disable DAD. - If 1, perform DAD (default). - If >1, perform DAD and disable IPv6 operation if DAD for MAC-based link-local address has been failed (RFC4862 5.4.5). We do not follow RFC4862 by default. Refer to the netdev thread entitled "Linux IPv6 DAD not full conform to RFC 4862 ?" http://www.spinics.net/lists/netdev/msg52027.html Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* | ipv6: Add disable_ipv6 sysctl to disable IPv6 operaion on specific interface.YOSHIFUJI Hideaki2008-07-033-1/+20
| | | | | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* | ipv6: Assume the loopback address in link-local scope.YOSHIFUJI Hideaki2008-07-031-1/+1
| | | | | | | | | | | | | | Handle interface property strictly when looking up a route for the loopback address (RFC4291 2.5.3). Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* | ipv6: Do not forward packets with the unspecified source address.YOSHIFUJI Hideaki2008-07-031-1/+2
| | | | | | | | | | | | RFC4291 2.5.2. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* | ipv6: Do not assign non-valid address on interface.YOSHIFUJI Hideaki2008-07-031-0/+7
| | | | | | | | | | | | | | | | | | | | Check the type of the address when adding a new one on interface. - the unspecified address (::) is always disallowed (RFC4291 2.5.2) - the loopback address is disallowed unless the interface is (one of) loopback (RFC4291 2.5.3). - multicast addresses are disallowed. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* | icmp: fix units for ratelimitStephen Hemminger2008-07-011-1/+2
| | | | | | | | | | | | | | | | | | Convert the sysctl values for icmp ratelimit to use milliseconds instead of jiffies which is based on kernel configured HZ. Internal kernel jiffies are not a proper unit for any userspace API. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'master' of ↵David S. Miller2008-06-287-12/+27
|\ \ | |/ | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl4965-base.c
| * ipv6 route: Convert rt6_device_match() to use RT6_LOOKUP_F_xxx flags.YOSHIFUJI Hideaki2008-06-271-3/+3
| | | | | | | | | | | | | | | | | | | | The commit 77d16f450ae0452d7d4b009f78debb1294fb435c ("[IPV6] ROUTE: Unify RT6_F_xxx and RT6_SELECT_F_xxx flags") intended to pass various routing lookup hints around RT6_LOOKUP_F_xxx flags, but conversion was missing for rt6_device_match(). Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * inet fragments: fix race between inet_frag_find and inet_frag_secret_rebuildPavel Emelyanov2008-06-272-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that while we work w/o the inet_frags.lock even read-locked the secret rebuild timer may occur (on another CPU, since BHs are still disabled in the inet_frag_find) and change the rnd seed for ipv4/6 fragments. It was caused by my patch fd9e63544cac30a34c951f0ec958038f0529e244 ([INET]: Omit double hash calculations in xxx_frag_intern) late in the 2.6.24 kernel, so this should probably be queued to -stable. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tcp: /proc/net/tcp rto,ato values not scaled properly (v2)Stephen Hemminger2008-06-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | I found another case where we are sending information to userspace in the wrong HZ scale. This should have been fixed back in 2.5 :-( This means an ABI change but as it stands there is no way for an application like ss to get the right value. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * netfilter: ip6table_mangle: don't reroute in LOCAL_INPatrick McHardy2008-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | Rerouting should only happen in LOCAL_OUT, in INPUT its useless since the packet has already chosen its final destination. Noticed by Alexey Dobriyan <adobriyan@gmail.com>. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv6: Drop packets for loopback address from outside of the box.YOSHIFUJI Hideaki2008-06-191-0/+9
| | | | | | | | | | | | | | | | | | [ Based upon original report and patch by Karsten Keil. Karsten has verified that this fixes the TAHI test case "ICMPv6 test v6LC.5.1.2 Part F". -DaveM ] Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ipv6: Remove options header when setsockopt's optlen is 0Shan Wei2008-06-191-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | Remove the sticky Hop-by-Hop options header by calling setsockopt() for IPV6_HOPOPTS with a zero option length, per RFC3542. Routing header and Destination options header does the same as Hop-by-Hop options header. Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: Discard and warn about LRO'd skbs received for forwardingBen Hutchings2008-06-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | Add skb_warn_if_lro() to test whether an skb was received with LRO and warn if so. Change br_forward(), ip_forward() and ip6_forward() to call it) and discard the skb if it returns true. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud