18 Aug, 2008
1 commit
-
When get receiving interface index while no message is received,
the bounded device's index of the socket should be returned.RFC 3542:
Issuing getsockopt() for the above options will return the sticky
option value i.e., the value set with setsockopt(). If no sticky
option value has been set getsockopt() will return the following
values:- For the IPV6_PKTINFO option, it will return an in6_pktinfo
structure with ipi6_addr being in6addr_any and ipi6_ifindex being
zero.Signed-off-by: Yang Hongyang
Signed-off-by: David S. Miller
04 Aug, 2008
1 commit
-
When Set Hop-by-Hop options header with NULL data
pointer and optlen is not zero use setsockopt(),
the kernel successfully return 0 instead of
return error EINVAL or EFAULT.This patch fix the problem.
Signed-off-by: Yang Hongyang
Signed-off-by: David S. Miller
20 Jul, 2008
1 commit
-
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller
19 Jul, 2008
1 commit
-
Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller
28 Jun, 2008
1 commit
-
Conflicts:
drivers/net/wireless/iwlwifi/iwl4965-base.c
20 Jun, 2008
1 commit
-
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
Acked-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller
14 Jun, 2008
1 commit
-
Conflicts:
drivers/net/smc911x.c
12 Jun, 2008
4 commits
-
This patch removes CVS keywords that weren't updated for a long time
from comments.Signed-off-by: Adrian Bunk
Signed-off-by: David S. Miller -
IPV6_MULTICAST_HOPS, for example, is not valid for stream sockets.
Since they are virtually unavailable for stream sockets,
we should return ENOPROTOOPT instead of EINVAL.Signed-off-by: YOSHIFUJI Hideaki
-
Only 0 and 1 are valid for IPV6_MULTICAST_LOOP socket option,
and we should return an error of EINVAL otherwise, per RFC3493.Based on patch from Shan Wei .
Signed-off-by: YOSHIFUJI Hideaki
-
Signed-off-by: YOSHIFUJI Hideaki
05 Jun, 2008
5 commits
-
Signed-off-by: Denis V. Lunev
Signed-off-by: YOSHIFUJI Hideaki -
It is not allowed to change underlying protocol for
int fd = socket(PF_INET6, SOCK_RAW, IPPROTO_UDP);Signed-off-by: Denis V. Lunev
Signed-off-by: YOSHIFUJI Hideaki -
Signed-off-by: YOSHIFUJI Hideaki
-
If get destination options with length which is not enough for that
option,getsockopt() will still return the real length of the option,
which is larger then the buffer space.
This is because ipv6_getsockopt_sticky() returns the real length of
the option.This patch fix this problem.
Signed-off-by: Yang Hongyang
Signed-off-by: YOSHIFUJI Hideaki -
If we pass NULL data buffer to getsockopt(), it will return 0,
and the option length is set to -EFAULT:
getsockopt(sk, IPPROTO_IPV6, IPV6_DSTOPTS, NULL, &len);This is because ipv6_getsockopt_sticky() will return -EFAULT or
-EINVAL if some error occur.This patch fix this problem.
Signed-off-by: Yang Hongyang
Signed-off-by: YOSHIFUJI Hideaki
01 May, 2008
1 commit
-
The last hunk from the commit dae50295 (ipv4/ipv6 compat: Fix SSM
applications on 64bit kernels.) escaped from the compat_ipv6_setsockopt
to the ipv6_getsockopt (I guess due to patch smartness wrt searching
for context) thus breaking 32-bit and 64-bit-without-compat compilation.Signed-off-by: Pavel Emelyanov
Acked-by: David L Stevens
Signed-off-by: David S. Miller
29 Apr, 2008
1 commit
-
This patch adds support for getsockopt for MCAST_MSFILTER for
both IPv4 and IPv6. It depends on the previous setsockopt patch,
and uses the same method.Signed-off-by: David L Stevens
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller
28 Apr, 2008
1 commit
-
Add support on 64-bit kernels for seting 32-bit compatible MCAST*
socket options.Signed-off-by: David L Stevens
Signed-off-by: David S. Miller
14 Apr, 2008
1 commit
-
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller
12 Apr, 2008
2 commits
-
Signed-off-by: YOSHIFUJI Hideaki
-
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
Signed-off-by: YOSHIFUJI Hideaki
11 Apr, 2008
1 commit
-
| 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 hereSigned-off-by: YOSHIFUJI Hideaki
05 Apr, 2008
1 commit
-
Based on ancient patch by Mickael Hoerdt
, which is available at
.Signed-off-by: YOSHIFUJI Hideaki
01 Apr, 2008
1 commit
-
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
Signed-off-by: David S. Miller
26 Mar, 2008
1 commit
-
Introduce per-sock inlines: sock_net(), sock_net_set()
and per-inet_timewait_sock inlines: twsk_net(), twsk_net_set().
Without CONFIG_NET_NS, no namespace other than &init_net exists.
Let's explicitly define them to help compiler optimizations.Signed-off-by: YOSHIFUJI Hideaki
25 Mar, 2008
2 commits
-
Signed-off-by: YOSHIFUJI Hideaki
-
Last part of hop-limit determination is always:
hoplimit = dst_metric(dst, RTAX_HOPLIMIT);
if (hoplimit < 0)
hoplimit = ipv6_get_hoplimit(dst->dev).Let's consolidate it as ip6_dst_hoplimit(dst).
Signed-off-by: YOSHIFUJI Hideaki
08 Mar, 2008
1 commit
-
This patch adds some missing namespace
Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller
07 Mar, 2008
1 commit
-
This reverts commit db1ed684f6c430c4cdad67d058688b8a1b5e607c ("[IPV6]
UDP: Rename IPv6 UDP files."), commit
8be8af8fa4405652e6c0797db5465a4be8afb998 ("[IPV4] UDP: Move
IPv4-specific bits to other file.") and commit
e898d4db2749c6052072e9bc4448e396cbdeb06a ("[UDP]: Allow users to
configure UDP-Lite.").First, udplite is of such small cost, and it is a core protocol just
like TCP and normal UDP are.We spent enormous amounts of effort to make udplite share as much code
with core UDP as possible. All of that work is less valuable if we're
just going to slap a config option on udplite support.It is also causing build failures, as reported on linux-next, showing
that the changeset was not tested very well. In fact, this is the
second build failure resulting from the udplite change.Finally, the config options provided was a bool, instead of a modular
option. Meaning the udplite code does not even get build tested
by allmodconfig builds, and furthermore the user is not presented
with a reasonable modular build option which is particularly needed
by distribution vendors.Signed-off-by: David S. Miller
04 Mar, 2008
2 commits
-
Signed-off-by: YOSHIFUJI Hideaki
-
Let's give users an option for disabling UDP-Lite (~4K).
old:
| text data bss dec hex filename
| 286498 12432 6072 305002 4a76a net/ipv4/built-in.o
| 193830 8192 3204 205226 321aa net/ipv6/ipv6.onew (without UDP-Lite):
| text data bss dec hex filename
| 284086 12136 5432 301654 49a56 net/ipv4/built-in.o
| 191835 7832 3076 202743 317f7 net/ipv6/ipv6.oSigned-off-by: YOSHIFUJI Hideaki
29 Jan, 2008
2 commits
-
1) Cleanups (all functions are prefixed by sock_prot_inuse)
sock_prot_inc_use(prot) -> sock_prot_inuse_add(prot,-1)
sock_prot_dec_use(prot) -> sock_prot_inuse_add(prot,-1)
sock_prot_inuse() -> sock_prot_inuse_get()New functions :
sock_prot_inuse_init() and sock_prot_inuse_free() to abstract pcounter use.
2) if CONFIG_PROC_FS=n, we can zap 'inuse' member from "struct proto",
since nobody wants to read the inuse value.This saves 1372 bytes on i386/SMP and some cpu cycles.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
This patchset makes the different protocols to return an error code, so
the af_inet6 module can check the initialization was correct or not.The raw6 was taken into account to be consistent with the rest of the
protocols, but the registration is at the same place.
Because the raw6 has its own init function, the proto and the ops structure
can be moved inside the raw6.c file.Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller
17 Dec, 2007
1 commit
-
If CONFIG_NETFILTER if not selected when compile the kernel source code,
ipv6_getsockopt will returen an EINVAL error if optname is not supported by
the kernel. But if CONFIG_NETFILTER is selected, ENOPROTOOPT error will
be return.This patch fix to always return ENOPROTOOPT error if optname argument of
ipv6_getsockopt is not supported by the kernel.Signed-off-by: Wei Yongjun
Signed-off-by: David S. Miller
12 Oct, 2007
1 commit
-
From RFC 3493, Section 5.2:
IPV6_MULTICAST_IF
Set the interface to use for outgoing multicast packets. The
argument is the index of the interface to use. If the
interface index is specified as zero, the system selects the
interface (for example, by looking up the address in a routing
table and using the resulting interface).This patch adds support for (index == 0) to reset the value to it's
original state, allowing the system to choose the best interface. IPv4
already behaves this way.Signed-off-by: Brian Haley
Acked-by: David L Stevens
Signed-off-by: David S. Miller
11 Oct, 2007
3 commits
-
Fix a bunch of sparse warnings. Mostly about 0 used as
NULL pointer, and shadowed variable declarations.
One notable case was that hash size should have been unsigned.Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller -
This patch makes most of the generic device layer network
namespace safe. This patch makes dev_base_head a
network namespace variable, and then it picks up
a few associated variables. The functions:
dev_getbyhwaddr
dev_getfirsthwbytype
dev_get_by_flags
dev_get_by_name
__dev_get_by_name
dev_get_by_index
__dev_get_by_index
dev_ioctl
dev_ethtool
dev_load
wireless_process_ioctlwere modified to take a network namespace argument, and
deal with it.vlan_ioctl_set and brioctl_set were modified so their
hooks will receive a network namespace argument.So basically anthing in the core of the network stack that was
affected to by the change of dev_base was modified to handle
multiple network namespaces. The rest of the network stack was
simply modified to explicitly use &init_net the initial network
namespace. This can be fixed when those components of the network
stack are modified to handle multiple network namespaces.For now the ifindex generator is left global.
Fundametally ifindex numbers are per namespace, or else
we will have corner case problems with migration when
we get that far.At the same time there are assumptions in the network stack
that the ifindex of a network device won't change. Making
the ifindex number global seems a good compromise until
the network stack can cope with ifindex changes when
you change namespaces, and the like.Signed-off-by: Eric W. Biederman
Signed-off-by: David S. Miller -
Add v4mapped address inline to avoid calls to ipv6_addr_type().
Signed-off-by: Brian Haley
Signed-off-by: David S. Miller
27 Aug, 2007
1 commit
-
Fix IP[V6]_ADD_MEMBERSHIP and IP[V6]_DROP_MEMBERSHIP to
return -EPROTO for connection oriented sockets.Signed-off-by: Flavio Leitner
Signed-off-by: David S. Miller