summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* [SCTP]: sctp_process_init() and sctp_source() switched to net-endian.Al Viro2006-12-033-17/+7Star
| | | | | | | | | both are done in one go since almost always we have result of the latter immediately passed to the former. Possibly non-obvious note: sctp_process_param() is endian-agnostic Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: sctp_copy_one_addr() switched to net-endian.Al Viro2006-12-031-5/+3Star
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: sctp_has_association() switched to net-endian.Al Viro2006-12-033-7/+4Star
| | | | | | | Ditto for its only caller (sctp_endpoint_is_peeled_off) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: sctp_endpoint_lookup_assoc() switched to net-endian.Al Viro2006-12-032-10/+8Star
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Switch ->from_addr_param() to net-endian.Al Viro2006-12-035-27/+18Star
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Switch sctp_add_bind_addr() to net-endian.Al Viro2006-12-034-12/+15
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Switch sctp_assoc_add_peer() to net-endian.Al Viro2006-12-033-19/+21
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: sctp_transport_{init,new}() switched to net-endian.Al Viro2006-12-033-4/+6
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Switch ->from_skb() to net-endian.Al Viro2006-12-034-20/+11Star
| | | | | | | All instances switched, callers updated. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Switch sctp_cookie ->peer_addr to net-endian.Al Viro2006-12-032-3/+7
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: sctp_init_addrs() switched to net-endian.Al Viro2006-12-032-4/+4
| | | | | | | Caller adjusted. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Switch sctp_assoc_is_match to net-endian.Al Viro2006-12-032-14/+20
| | | | | | | | | | Along with it, statics in input.c that end up calling it (__sctp_lookup_association, sctp_lookup_association, __sctp_rcv_init_lookup, __sctp_rcv_lookup). Callers are adjusted. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Switch sctp_endpoint_is_match() to net-endian.Al Viro2006-12-032-6/+7
| | | | | | | | The only caller (__sctp_rcv_lookup_endpoint()) also switched, its caller adjusted Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Switch sctp_del_bind_addr() to net-endian.Al Viro2006-12-033-17/+7Star
| | | | | | | Callers adjusted. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Switch address inside the heartbeat opaque data to net-endian.Al Viro2006-12-031-4/+2Star
| | | | | | | | Its only use happens on the same host, when it gets quoted back to us. So we are free to flip to net-endian and avoid extra PITA. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Switch sctp_assoc_lookup_paddr() to net-endian.Al Viro2006-12-035-13/+19
| | | | | | | Callers updated. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: sctp_assoc_del_peer() switched to net-endian.Al Viro2006-12-033-7/+4Star
| | | | | | | Callers adjusted. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Annotate ->dst_saddr()Al Viro2006-12-032-6/+4Star
| | | | | | | | | | | switched to taking a pointer to net-endian sctp_addr and a net-endian port number. Instances and callers adjusted; interestingly enough, the only calls are direct calls of specific instances - the method is not used at all. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Switch ->primary_addr to net-endian.Al Viro2006-12-033-8/+4Star
| | | | | | | Users adjusted. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Switch sctp_bind_addr_match() to net-endian.Al Viro2006-12-034-11/+9Star
| | | | | | | Callers adjusted. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Switch ->cmp_addr() and sctp_cmp_addr_exact() to net-endian.Al Viro2006-12-038-25/+41
| | | | | | | | | | | instances of ->cmp_addr() are fine with switching both arguments to net-endian; callers other than in sctp_cmp_addr_exact() (both as ->cmp_addr(...) and direct calls of instances) adjusted; sctp_cmp_addr_exact() switched to net-endian itself and adjustment is done in its callers Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Pass net-endian to ->seq_dump_addr()Al Viro2006-12-031-2/+2
| | | | | | | | No actual modifications of method instances are needed - they don't look at port numbers. Switch callers... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP] embedded sctp_addr: net-endian mirrorsAl Viro2006-12-035-7/+15
| | | | | | | | | Add sctp_chunk->source, sctp_sockaddr_entry->a, sctp_transport->ipaddr and sctp_transport->saddr, maintain them as net-endian mirrors of their host-endian counterparts. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Beginning of conversion to net-endian for embedded sctp_addr.Al Viro2006-12-0311-87/+87
| | | | | | | | | | | | | | | | | | | Part 1: rename sctp_chunk->source, sctp_sockaddr_entry->a, sctp_transport->ipaddr and sctp_transport->saddr (to ..._h) The next patch will reintroduce these fields and keep them as net-endian mirrors of the original (renamed) ones. Split in two patches to make sure that we hadn't forgotten any instanes. Later in the series we'll eliminate uses of host-endian variants (basically switching users to net-endian counterparts as we progress through that mess). Then host-endian ones will die. Other embedded host-endian sctp_addr will be easier to switch directly, so we leave them alone for now. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP] bug: endianness problem in sctp_getsockopt_sctp_status()Al Viro2006-12-031-2/+2
| | | | | | | | Again, invalid sockaddr passed to userland - host-endiand sin_port. Potential leak, again, but less dramatic than in previous case. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP] bug: sctp_assoc_control_transport() breakageAl Viro2006-12-031-2/+4
| | | | | | | | | | | a) struct sockaddr_storage * passed to sctp_ulpevent_make_peer_addr_change() actually points at union sctp_addr field in a structure. Then that sucker gets copied to userland, with whatever junk we might have there. b) it's actually having host-endian sin_port. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP] bug: sctp_find_unmatch_addr() compares net-endian to host-endianAl Viro2006-12-031-1/+3
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP] bug: sctp_assoc_lookup_laddr() is broken with ipv6.Al Viro2006-12-031-1/+3
| | | | | | | | | It expects (and gets) laddr with net-endian sin_port. And then it calls sctp_bind_addr_match(), which *does* care about port numbers in case of ipv6 and expects them to be host-endian. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Beginning of sin_port fixes.Al Viro2006-12-031-17/+12Star
| | | | | | | | | | That's going to be a long series. Introduced temporary helpers doing copy-and-convert for sctp_addr; they are used to kill flip-in-place in global data structures and will be used to gradually push host-endian uses of sctp_addr out of existence. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Trivial sctp endianness annotations.Al Viro2006-12-034-13/+13
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: SCTP_CMD_ASSOC_FAILED annotations.Al Viro2006-12-032-13/+13
| | | | | | | also always get __be16 protocol error; switch to SCTP_PERR() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: SCTP_CMD_INIT_FAILED annotations.Al Viro2006-12-032-7/+7
| | | | | | | | | | argument stored for SCTP_CMD_INIT_FAILED is always __be16 (protocol error). Introduced new field and accessor for it (SCTP_PERR()); switched to their use (from SCTP_U32() and .u32) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: sctp_stop_t1_and_abort() annotations.Al Viro2006-12-031-4/+4
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: sctp_make_op_error() annotations.Al Viro2006-12-031-1/+1
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Annotate sctp_init_cause().Al Viro2006-12-031-1/+1
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV6] net/ipv6/sit.c: make 2 functions staticAdrian Bunk2006-12-031-2/+2
| | | | | | | This patch makes two needlessly global functions static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* [XFRM]: Make copy_to_user_policy_type take a typeJamal Hadi Salim2006-12-031-7/+7
| | | | | | | | Make copy_to_user_policy_type take a type instead a policy and fix its users to pass the type Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BRIDGE] netlink: Convert bridge netlink code to new netlink interfaceThomas Graf2006-12-031-54/+38Star
| | | | | | | | Removes dependency on buggy rta_buf, fixes a memory corruption bug due to a unvalidated netlink attribute, and simplifies the code. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* [DCCP]: Adds the tx buffer sysctlsIan McDonald2006-12-031-0/+9
| | | | | | | This one got lost on the way from Ian to Gerrit to me, fix it. Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
* [DCCP] CCID3: Remove non-referenced variableIan McDonald2006-12-031-3/+0Star
| | | | | | | This removes a non-referenced variable. Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
* [DCCP]: Make dccp_probe more portableIan McDonald2006-12-031-2/+4
| | | | | | | This makes the code of the dccp_probe module more portable. Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
* [CCID 3]: Add annotations for socket structuresGerrit Renker2006-12-031-35/+55
| | | | | | | | This adds documentation to the CCID 3 rx/tx socket fields, plus some minor re-formatting. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
* [DCCP]: Simplified conditions due to use of enum:8 statesGerrit Renker2006-12-0314-156/+115Star
| | | | | | | | | | | | | | | | | | | | | | This reaps the benefit of the earlier patch, which changed the type of CCID 3 states to use enums, in that many conditions are now simplified and the number of possible (unexpected) values is greatly reduced. In a few instances, this also allowed to simplify pre-conditions; where care has been taken to retain logical equivalence. [DCCP]: Introduce a consistent BUG/WARN message scheme This refines the existing set of DCCP messages so that * BUG(), BUG_ON(), WARN_ON() have meaningful DCCP-specific counterparts * DCCP_CRIT (for severe warnings) is not rate-limited * DCCP_WARN() is introduced as rate-limited wrapper Using these allows a faster and cleaner transition to their original counterparts once the code has matured into a full DCCP implementation. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
* [DCCP]: Set TX Queue Length Bounds via SysctlIan McDonald2006-12-032-0/+11
| | | | | | | | | | | | | | Previously the transmit queue was unbounded. This patch: * puts a limit on transmit queue length and sends back EAGAIN if the buffer is full * sets the TX queue length to a sensible default * implements tx buffer sysctls for DCCP Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
* [DCCP]: Add CCID3 debug support to KconfigGerrit Renker2006-12-032-8/+19
| | | | | | | | | | | | | | | This adds a CCID3 debug option to the configuration menu which is missing in Kconfig, but already used by the code. CCID 2 already provides such an entry. To enable debugging, set CONFIG_IP_DCCP_CCID3_DEBUG=y NOTE: The use of ccid3_{t,r}x_state_name is safe, since now only enum values can appear. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
* [DCCP]: enable debug messages also for static buildsGerrit Renker2006-12-035-26/+37
| | | | | | | | | | | This patch * makes debugging (when configured) work both for static / module build * provides generic debugging macros for use in other DCCP / CCID modules * adds missing information about debug parameters to Kconfig * performs some code tidy-up Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
* NetLabel: honor the audit_enabled flagPaul Moore2006-12-034-39/+50
| | | | | | | | | | | The audit_enabled flag is used to signal when syscall auditing is to be performed. While NetLabel uses a Netlink interface instead of syscalls, it is reasonable to consider the NetLabel Netlink interface as a form of syscall so pay attention to the audit_enabled flag when generating audit messages in NetLabel. Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: James Morris <jmorris@namei.org>
* NetLabel: use cipso_v4_doi_search() for local CIPSOv4 functionsPaul Moore2006-12-031-3/+3
| | | | | | | | | | The cipso_v4_doi_search() function behaves the same as cipso_v4_doi_getdef() but is a local, static function so use it whenever possibile in the CIPSOv4 code base. Signed-of-by: Paul Moore <paul.moore@hp.com> Signed-off-by: James Morris <jmorris@namei.org>
* NetLabel: return the correct error for translated CIPSOv4 tagsPaul Moore2006-12-031-0/+4
| | | | | | | | | | | | The CIPSOv4 translated tag #1 mapping does not always return the correct error code if the desired mapping does not exist; instead of returning -EPERM it returns -ENOSPC indicating that the buffer is not large enough to hold the translated value. This was caused by failing to check a specific error condition. This patch fixes this so that unknown mappings return -EPERM which is consistent with the rest of the related CIPSOv4 code. Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: James Morris <jmorris@namei.org>
* NetLabel: fixup the handling of CIPSOv4 tags to allow for multiple tag typesPaul Moore2006-12-031-60/+53Star
| | | | | | | | | | While the original CIPSOv4 code had provisions for multiple tag types the implementation was not as great as it could be, pushing a lot of non-tag specific processing into the tag specific code blocks. This patch fixes that issue making it easier to support multiple tag types in the future. Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: James Morris <jmorris@namei.org>