summaryrefslogtreecommitdiffstats
path: root/net/ipv6
Commit message (Collapse)AuthorAgeFilesLines
* [TCP]: Remove owner from tcp_seq_afinfo.Denis V. Lunev2008-04-131-1/+3
| | | | | | | Move it to tcp_seq_afinfo->seq_fops as should be. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [TCP]: Place file operations directly into tcp_seq_afinfo.Denis V. Lunev2008-04-131-2/+0
| | | | | | | No need to have separate never-used variable. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [TCP]: Move seq_ops from tcp_iter_state to tcp_seq_afinfo.Denis V. Lunev2008-04-131-1/+3
| | | | | | | No need to create seq_operations for each instance of 'netstat'. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV6]: Fix IPV6_RECVERR for connected raw sockets.YOSHIFUJI Hideaki2008-04-121-2/+4
| | | | | | | Based on patch from Dmitry Butskoy <buc@odusz.so-cdu.ru>. Closes: 10437 Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPv6]: Change IPv6 unspecified destination address to ::1 for raw and ↵Brian Haley2008-04-122-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | un-connected sockets This patch fixes a difference between IPv4 and IPv6 when sending packets to the unspecified address (either 0.0.0.0 or ::) when using raw or un-connected UDP sockets. There are two cases where IPv6 either fails to send anything, or sends with the destination address set to ::. For example: --> ping -c1 0.0.0.0 PING 0.0.0.0 (127.0.0.1) 56(84) bytes of data. 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.032 ms --> ping6 -c1 :: PING ::(::) 56 data bytes ping: sendmsg: Invalid argument Doing a sendto("0.0.0.0") reveals: 10:55:01.495090 IP localhost.32780 > localhost.7639: UDP, length 100 Doing a sendto("::") reveals: 10:56:13.262478 IP6 fe80::217:8ff:fe7d:4718.32779 > ::.7639: UDP, length 100 If you issue a connect() first in the UDP case, it will be sent to ::1, similar to what happens with TCP. This restores the BSD-ism. Signed-off-by: Brian Haley <brian.haley@hp.com> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6] MROUTE: Adjust IPV6 multicast routing module to use mroute6 header ↵Rami Rosen2008-04-121-22/+13
| | | | | | | | | | | | | | declarations. - This patch adjusts IPv6 multicast routing module, net/ipv6/ip6mr.c, to use mroute6 header definitions instead of mroute. (MFC6_LINES instead of MFC_LINES, MAXMIFS instead of MAXVIFS, mifi_t instead of vifi_t.) - In addition, inclusion of some headers was removed as it is not needed. Signed-off-by: Rami Rosen <ramirose@gmail.com> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6]: Check length of int/boolean optval provided by user in setsockopt().YOSHIFUJI Hideaki2008-04-121-7/+61
| | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6]: Check length of optval provided by user in setsockopt().Wang Chen2008-04-121-2/+8
| | | | | | | | | Check length of setsockopt's optval, which provided by user, before copy it from user space. For POSIX compliant, return -EINVAL for setsockopt of short lengths. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6] MIP6: Use our standard definitions for paddings.YOSHIFUJI Hideaki2008-04-121-2/+2
| | | | | | | MIP6_OPT_PAD_X are actually for paddings in destination option header. Replace them with our standard IPV6_TLV_PADX. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6]: Use in6addr_any where appropriate.YOSHIFUJI Hideaki2008-04-122-11/+12
| | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6]: Define constants for link-local multicast addresses.YOSHIFUJI Hideaki2008-04-123-37/+16
| | | | | | | - Define link-local all-node / all-router multicast addresses. - Remove ipv6_addr_all_nodes() and ipv6_addr_all_routers(). Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6]: Make address arguments const.YOSHIFUJI Hideaki2008-04-125-28/+28
| | | | | | | | | | | | | | | | | | | - net/ipv6/addrconf.c: ipv6_get_ifaddr(), ipv6_dev_get_saddr() - net/ipv6/mcast.c: ipv6_sock_mc_join(), ipv6_sock_mc_drop(), inet6_mc_check(), ipv6_dev_mc_inc(), __ipv6_dev_mc_dec(), ipv6_dev_mc_dec(), ipv6_chk_mcast_addr() - net/ipv6/route.c: rt6_lookup(), icmp6_dst_alloc() - net/ipv6/ip6_output.c: ip6_nd_hdr() - net/ipv6/ndisc.c: ndisc_send_ns(), ndisc_send_rs(), ndisc_send_redirect(), ndisc_get_neigh(), __ndisc_send() Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6] ADDRCONF: Uninline ipv6_isatap_eui64().YOSHIFUJI Hideaki2008-04-121-2/+24
| | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6] ADDRCONF: Uninline ipv6_addr_hash().YOSHIFUJI Hideaki2008-04-121-0/+19
| | | | | | The function is only used in net/ipv6/addrconf.c. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6]: Use ipv6_addr_equal() instead of !ipv6_addr_cmp().YOSHIFUJI Hideaki2008-04-112-3/+3
| | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6] FIB_RULE: Sparse: fib6_rules_cleanup() is of void.YOSHIFUJI Hideaki2008-04-111-1/+1
| | | | | | | net/ipv6/fib6_rules.c:319:2: warning: returning void-valued expression Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6]: Sparse: Reuse previous delaration where appropriate.YOSHIFUJI Hideaki2008-04-112-4/+1
| | | | | | | | | | | | net/ipv6/ipv6_sockglue.c:162:16: warning: symbol 'net' shadows an earlier one | net/ipv6/ipv6_sockglue.c:111:13: originally declared here | net/ipv6/ipv6_sockglue.c:175:16: warning: symbol 'net' shadows an earlier one | net/ipv6/ipv6_sockglue.c:111:13: originally declared here | net/ipv6/ip6mr.c:1241:10: warning: symbol 'ret' shadows an earlier one | net/ipv6/ip6mr.c:1163:6: originally declared here Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6] SIT: Sparse: Use NULL pointer instead of 0.YOSHIFUJI Hideaki2008-04-111-1/+1
| | | | | | | net/ipv6/sit.c:382:42: warning: Using plain integer as NULL pointer Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [IPV6]: Kill several warnings without CONFIG_IPV6_MROUTE.YOSHIFUJI Hideaki2008-04-111-14/+12
| | | | | | Pointed out by Andrew Morton <akpm@linux-foundation.org>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* [Syncookies]: Add support for TCP options via timestamps.Florian Westphal2008-04-102-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | Allow the use of SACK and window scaling when syncookies are used and the client supports tcp timestamps. Options are encoded into the timestamp sent in the syn-ack and restored from the timestamp echo when the ack is received. Based on earlier work by Glenn Griffin. This patch avoids increasing the size of structs by encoding TCP options into the least significant bits of the timestamp and by not using any 'timestamp offset'. The downside is that the timestamp sent in the packet after the synack will increase by several seconds. changes since v1: don't duplicate timestamp echo decoding function, put it into ipv4/syncookie.c and have ipv6/syncookies.c use it. Feedback from Glenn Griffin: fix line indented with spaces, kill redundant if () Reviewed-by: Hagen Paul Pfeifer <hagen@jauu.net> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'net-2.6.26-isatap-20080403' of ↵David S. Miller2008-04-086-71/+284
|\ | | | | | | git://git.linux-ipv6.org/gitroot/yoshfuji/linux-2.6-dev
| * [IPV6] NDISC: Don't rely on node-type hint from L2 unless required.YOSHIFUJI Hideaki2008-04-032-0/+14
| | | | | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * [IPV6]: Unify ip6_onlink() and ipip6_onlink().YOSHIFUJI Hideaki2008-04-033-50/+27
| | | | | | | | | | Both are identical, let's create ipv6_chk_prefix() and use it in both places.
| * [IPV6] NDISC: Ignore route information with /0 prefix from interior router.YOSHIFUJI Hideaki2008-04-031-1/+7
| | | | | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * [IPV6] SIT: Add SIOCGETPRL ioctl to get/dump PRL.YOSHIFUJI Hideaki2008-04-031-9/+87
| | | | | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * [IPV6] SIT: Disallow 0.0.0.0 in PRL and Flush PRL if given for DEL.YOSHIFUJI Hideaki2008-04-031-1/+4
| | | | | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * [IPV6] SIT: Fix locking issues in PRL management.YOSHIFUJI Hideaki2008-04-031-17/+32
| | | | | | | | | | | | To protect PRL list, use ipip6_lock. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * [IPV6] SIT: Add PRL management for ISATAP.Templin, Fred L2008-04-033-46/+166
| | | | | | | | | | | | | | | | | | | | | | | | This patch updates the Linux the Intra-Site Automatic Tunnel Addressing Protocol (ISATAP) implementation. It places the ISATAP potential router list (PRL) in the kernel and adds three new private ioctls for PRL management. [Add several changes of structure name, constant names etc. - yoshfuji] Signed-off-by: Fred L. Templin <fred.l.templin@boeing.com> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* | [IPV6] MROUTE: Use skb_tail_pointer(skb) instead of skb->tail.YOSHIFUJI Hideaki2008-04-051-3/+3
| | | | | | | | | | | | | | This bug resulted in compilation error on 64bit machines. Pointed out by Rami Rosen <roszenrami@gmail.com>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* | [IPV6] MROUTE: Support PIM-SM (SSM).YOSHIFUJI Hideaki2008-04-052-1/+281
| | | | | | | | | | | | | | | | Based on ancient patch by Mickael Hoerdt <hoerdt@clarinet.u-strasbg.fr>, which is available at <http://www-r2.u-strasbg.fr/~hoerdt/dev/linux_ipv6_mforwarding/patch-linux-ipv6-mforwarding-0.1a>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* | [IPV6] MROUTE: Support multicast forwarding.YOSHIFUJI Hideaki2008-04-0510-30/+1521
| | | | | | | | | | | | | | | | Based on ancient patch by Mickael Hoerdt <hoerdt@clarinet.u-strasbg.fr>, which is available at <http://www-r2.u-strasbg.fr/~hoerdt/dev/linux_ipv6_mforwarding/patch-linux-ipv6-mforwarding-0.1a>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* | [IPV6] ADDRCONF: Fix array size for sysctls.YOSHIFUJI Hideaki2008-04-041-1/+1
| | | | | | | | | | | | | | | | | | We have been using __NET_IPV6_MAX for adjusting the size of array for sysctl table, but it does not work any longer because of the deprecation of NET_IPV6_xxx constants. Let's use DEVCONF_MAX instead. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* | [IPV6]: Simplify IPv6 control sockets creation.Denis V. Lunev2008-04-033-30/+17
| | | | | | | | | | | | | | | | Do this by replacing sock_create_kern with inet_ctl_sock_create. Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETNS]: Inet control socket should not hold a namespace.Denis V. Lunev2008-04-031-11/+3
| | | | | | | | | | | | | | | | | | | | This is a generic requirement, so make inet_ctl_sock_create namespace aware and create a inet_ctl_sock_destroy wrapper around sk_release_kernel. Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [INET]: Let inet_ctl_sock_create return sock rather than socket.Denis V. Lunev2008-04-031-3/+2
| | | | | | | | | | | | | | | | All upper protocol layers are already use sock internally. Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [INET]: Rename inet_csk_ctl_sock_create to inet_ctl_sock_create.Denis V. Lunev2008-04-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | This call is nothing common with INET connection sockets code. It simply creates an unhashes kernel sockets for protocol messages. Move the new call into af_inet.c after the rename. Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'master' of ↵David S. Miller2008-04-024-4/+24
|\ \ | |/ |/| | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/s2io.c
| * [IPV6]: Fix ICMP relookup error path dst leakHerbert Xu2008-04-021-2/+2
| | | | | | | | | | | | | | | | | | When we encounter an error while looking up the dst the second time we need to drop the first dst. This patch is pretty much the same as the one for IPv4. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
| * IPv6: do not create temporary adresses with too short preferred lifetimeBenoit Boissinot2008-04-021-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | From RFC341: A temporary address is created only if this calculated Preferred Lifetime is greater than REGEN_ADVANCE time units. In particular, an implementation must not create a temporary address with a zero Preferred Lifetime. Signed-off-by: Benoit Boissinot <benoit.boissinot@ens-lyon.org> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * IPv6: only update the lifetime of the relevant temporary addressBenoit Boissinot2008-04-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | When receiving a prefix information from a routeur, only update the lifetimes of the temporary address associated with that prefix. Otherwise if one deprecated prefix is advertized, all your temporary addresses will become deprecated. Signed-off-by: Benoit Boissinot <benoit.boissinot@ens-lyon.org> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [IPV6] MCAST: Ensure to check multicast listener(s).YOSHIFUJI Hideaki2008-03-311-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In ip6_mc_input(), we need to check whether we have listener(s) for the packet. After commit ae7bf20a6316272acfcaef5d265b18aaa54b41e4, all packets for multicast destinations are delivered to upper layer if IFF_PROMISC or IFF_ALLMULTI is set. In fact, bug was rather ancient; the original (before the commit) intent of the dev->flags check was to skip the ipv6_chk_mcast_addr() call, assuming L2 filters packets appropriately, but it was even not true. Let's explicitly check our multicast list. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Acked-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [INET]: inet_frag_evictor() must run with BH disabledDavid S. Miller2008-03-281-0/+2
| | | | | | | | | | | | Based upon a lockdep trace from Dave Jones. Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IPV6] RAW: Remove ancient comment.YOSHIFUJI Hideaki2008-04-011-5/+0
| | | | | | | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IPV6][NETNS]: Display per-net info in sockstat6 file.Pavel Emelyanov2008-03-311-7/+34
| | | | | | | | | | | | | | | | Do with the sockstat6 file what we've already done for the sockstat. Same good side effect - ipv6 reassembling stats are now shown per-net. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [SOCK][NETNS]: Register sockstat(6) files in each net.Pavel Emelyanov2008-03-311-5/+24
| | | | | | | | | | | | | | | | Currently they live in init_net only, but now almost all the info they can provide is available per-net. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [SOCK][NETNS]: Add a struct net argument to sock_prot_inuse_add and _get.Pavel Emelyanov2008-03-313-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This counter is about to become per-proto-and-per-net, so we'll need two arguments to determine which cell in this "table" to work with. All the places, but proc already pass proper net to it - proc will be tuned a bit later. Some indentation with spaces in proc files is done to keep the file coding style consistent. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [UDP]: Remove owner from udp_seq_afinfo.Denis V. Lunev2008-03-282-2/+6
| | | | | | | | | | | | | | Move it to udp_seq_afinfo->seq_fops as should be. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [UDP]: Place file operations directly into udp_seq_afinfo.Denis V. Lunev2008-03-282-4/+0
| | | | | | | | | | | | | | No need to have separate never-used variable. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [UDP]: Move seq_ops from udp_iter_state to udp_seq_afinfo.Denis V. Lunev2008-03-282-2/+6
| | | | | | | | | | | | | | No need to create seq_operations for each instance of 'netstat'. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [SOCK]: Drop inuse pcounter from struct proto (v2).Pavel Emelyanov2008-03-284-12/+0
| | | | | | | | | | | | | | | | An uppercut - do not use the pcounter on struct proto. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud