aboutsummaryrefslogtreecommitdiffstats
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2004-08-22[PATCH] Fix netpoll cleanup on abort without devMatt Mackall1-1/+2
If netpoll attempts to use a device without polling support, it will oops when shutting down. This adds a check that we've actually attached to a device. Signed-off-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-08-22[PATCH] kNFSd: fix race with flushing nfsd cache.Neil Brown1-1/+2
To purge an nfsd-authentication cache, we set the flush time to later than last-refresh time in the cache and call cache_flush. The easiest way to find 'later than last-refresh' is 'now+1'. This has two problems. 1/ if the time-of-day clock has gone bacwards, some entries might not be purged 2/ if a new entry is added in the same second as cache_purge ran, it will get ignored. To resolve these issues, we set the flushtime to the maximum possible time before calling cache_flush, and then set it back to the minimum time afterwards. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-08-22[PATCH] kNFSd: minor memory leak fix.Neil Brown1-0/+1
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-08-22[PATCH] nfsd: fix ip_map cache reference count leak.Neil Brown1-1/+2
Fix a leak: when auth_unix_lookup sets CACHE_NEGATIVE, it should also auth_domain_put() the reference it holds in ipm->m_client, since setting CACHE_NEGATIVE prevents ip_map_put() from putting the reference itself. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-08-22[PATCH] nfsd: simplify auth_domain_lookupNeil Brown1-19/+41
The interface between the auth_domain and the cache code is messy; the auth_domain code is the only real user of the full 11-argument DefineCacheLookup, and does weird stuff with it (like passing in through one of the arguments a bit of code with a conditional return). We could further parametrize DefineCacheLookup, but I think it's already too complicated. My solution is to just ignore DefineCacheLookup and write the auth_domain_lookup function from scratch. It's actually a pretty short function (much simpler than DefineCacheLookup itself), and it's much easier to read this short function than it is to read some special-cased DefineCacheLookup to verify that it does what it says it does.... Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-08-22[PATCH] nfsd: make cache_init initialize reference count to 1Neil Brown3-5/+1
Presumably anyone creating a new cache entry is going to want a reference on that cache; and indeed every caller of cache_init increments the reference count immediately afterwards. So may as well make cache_init set an initial reference count of 1. Also, note that cache_init initializes the flags; callers don't need to. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-08-22[PATCH] nfsd: nfsd is missing a put_group_info in the auth_nullNeil Brown1-0/+3
nfsd is missing a put_group_info in the auth_null case. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-08-22[PATCH] rcu: abstracted RCU dereferencingDipankar Sarma9-37/+25
Use abstracted RCU API to dereference RCU protected data. Hides barrier details. Patch from Paul McKenney. This patch introduced an rcu_dereference() macro that replaces most uses of smp_read_barrier_depends(). The new macro has the advantage of explicitly documenting which pointers are protected by RCU -- in contrast, it is sometimes difficult to figure out which pointer is being protected by a given smp_read_barrier_depends() call. Signed-off-by: Paul McKenney <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-08-22[PATCH] rcu: use call_rcu_bh() in route cacheDipankar Sarma2-27/+27
Use call_rcu_bh() in route cache. This allows faster grace periods and avoids dst cache overflows during DoS testing. This patch uses the call_rcu_bh() api in route cache code to facilitate quicker RCU grace periods. Quicker grace periods avoid overflow of dst cache in heavily loaded routers as seen in Robert Olsson's testing. Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-08-22[PATCH] remove dead prototypesCarl Spalletta3-13/+0
Remove a whole bunch of prototypes which declare no-longer-present functions. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-08-22[PATCH] err2-6: hashbin_remove_this() locking fixAndrew Morton1-3/+5
Fix locking error identified by the Stanford locking checker. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-08-22[PATCH] fix /proc/net/netstat outputCal Peake1-1/+1
net/ipv4/proc.c was updated to use a new mechanism for outputting /proc/net/snmp and /proc/net/netstat. However, a superfluous '\n' snuck in, breaking `netstat -s`
2004-08-09[PKT_SCHED]: Disable local bh's when grabbing qdisc_tree_lock in ↵Patrick McHardy1-2/+2
tc_dump_tfilter. I missed this one when fixing locking in __qdisc_destroy. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-09[PKT_SCHED]: Fix borrowing fairness in htb.Martin Devera1-8/+55
2004-08-09[NET]: Kill stray NET_FASTROUTE references.Pawel Sikora1-20/+0
Signed-off-by: Pawel Sikora <pluto@pld-linux.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-09[BRIDGE]: Fix problems with filtering and defragmentation.Stephen Hemminger1-5/+8
Dave, this patch from Bart De Schuymer <bdschuym@pandora.be> fixes problems when using filtering and defragmentation. The bridge needs to enforce the MTU restriction after going through the filtering chain not before, because the incoming filter may have reassembled an IP packet, that then needs to be fragmented on the output chain. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-09[IPSEC]: Add missing flow_cache_genid update to xfrm_policy_delete()Eugene Surovegin1-1/+4
Signed-off-by: Eugene Surovegin <ebs@ebshome.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-09[VLAN]: Fix device refcount bug.Stephen Hemminger1-1/+0
If you rmmod a network device that is in a vlan, the system hangs waiting for the refcount to go to zero, because it is -1. The problem is that the vlan notifier does an extra dev_put in NETDEV_UNREGISTER case of notifier. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-09[VLAN]: Use RCU for group operations.Stephen Hemminger3-76/+36
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-09[VLAN]: Mirror real devices carrier and hotplug state.Stephen Hemminger1-3/+20
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-09[VLAN]: Propagate ethtool/mii ioctls to the real device.Stephen Hemminger3-0/+30
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-07Make sysctl pass the pos pointer around properly.Linus Torvalds12-36/+39
Nobody ever fixed the big FIXME in sysctl - but we really need to pass around the proper "loff_t *" to all the sysctl functions if we want them to be well-behaved wrt the file pointer position. This is all preparation for making direct f_pos accesses go away.
2004-08-07[PATCH] mpoa patch done rightAlexander Viro3-185/+142
- conversion to seq_file, overflow fixes - qos_parse sanitized (3 sscanf calls instead of insane manual parsing) leaks plugged code cleaned up We still have serious races, but they are general problem in atm code - it has no locking whatsoever for any of the lists (mpcs, qos_head, per-client lists).
2004-08-07Mark the sunrpc cache control file nonseekable, andLinus Torvalds1-6/+2
remove the run-time tests for it.
2004-08-07Teach sendfile() to honour non-seekable source files.Linus Torvalds1-3/+0
Remove the test from the socket code, now that it's no longer necessary.
2004-08-06Add infrastructure for the VFS layer to mark files seekable.Linus Torvalds1-1/+1
We use a FMODE_LSEEK flag to match the existing read/write bits. This allows us to check for seekability on a VFS level for lseek/pread/pwrite, and cleans things up. Update some sites that used the numeric constants to use the symbolic values instead.
2004-08-06[NET]: Move sndmsg_page destruction back into TCP for now.David S. Miller2-8/+8
Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-04Cset exclude: davem@nuts.davemloft.net|ChangeSet|20040804202342|60209David S. Miller2-4/+4
2004-08-03[PKT_SCHED]: Move sch_atm over to qdisc_priv().David S. Miller1-2/+3
Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-03[PKT_SCHED]: Cache align qdisc data.Stephen Hemminger14-167/+172
This patch has qdisc code use the same interface as the netdevice code to cache align the object private data. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-03[PKT_SCHED]: Fix q_idx calculation in tc_dump_qdisc.Patrick McHardy1-2/+5
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-03[PKT_SCHED]: Use double-linked list for dev->qdisc_listPatrick McHardy2-30/+21
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-03[IPV4/6]: NULL out sk_sndmsg_{page,off} in flush_pending_frames not append_data.David S. Miller2-4/+4
Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-03[BRIDGE]: rmmod device while bridge is down failsStephen Hemminger1-9/+17
The changes to bridge notifier to handle link state changes introduced a bug. The case of device unregistering while bridge is down was no longer being handled. Add comment so maintainer doesn't forget. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-03[PKT_SCHED]: Remove useless noop_qdisc assignments in destroy functionsPatrick McHardy5-12/+1
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-03[PKT_SCHED]: remove unneccessary checks for qdisc->devPatrick McHardy2-4/+3
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-03[PKT_SCHED]: Refcount qdisc->dev for __qdisc_destroy rcu-callbackPatrick McHardy2-0/+4
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-03[PKT_SCHED]: Fix locking in __qdisc_destroy rcu-callbackPatrick McHardy2-17/+17
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-03[PKT_SCHED]: netem limit not returned correctlyStephen Hemminger1-1/+1
Minor leftover from earlier code. Netem scheduler is not reporting correct limit (ie for 'tc qdisc ls') because it is returning devices limit not it's own. Should apply to 2.4 as well (with fuzz) Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-02[NET]: Add skb_iter functions.Rusty Russell1-0/+67
There's no convenient function to walk the data of an skbuff; provide one. Netfilter extensions in particular can use this to examine packet contents without needing an entire copy. I originally wrote an 'skb_walk(skb, fn, data)' function, but open iterators are easier to use for complex cases. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-02[TCP]: BIC tcp congestion calculation timestampStephen Hemminger2-6/+18
Small change to bictcp based on the BIC 1.1 patches for web100. Keep track of last time congestion was computed, and recompute if cwnd changes or every 1/32 of a second. Also changes the initialization location for the parameters. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-02[IPSEC]: Move xfrm[46]_tunnel_check_size into xfrm[46]_output.cHerbert Xu5-46/+45
This patch moves xfrm[46]_tunnel_check_size() into xfrm[46]_output.c where it can be made static since it's only used there. While moving the icmp.h inclusions over I also discovered that the tunnel files are missing an inclusion of net/protocol.h. So I've added them as well. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-02[IPSEC]: Remove unnecessary inet_ecn.h inclusionsHerbert Xu7-7/+0
This is a couple of clean-ups stemming from the xfrm_output change. I should've removed the inet_ecn.h inclusions in that change as the ECN code has been moved to xfrm[46]_output.c. This patch does exactly that. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-02[BRIDGE]: Build fix for gcc-2.95.xAndrew Morton2-9/+11
gcc-2.95.c does not support anonymous unions. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-02Merge nuts.davemloft.net:/disk1/BK/network-2.6David S. Miller2-73/+76
into nuts.davemloft.net:/disk1/BK/net-2.6
2004-08-01[NETFILTER]: Fix compilation of ip_nat_snmp_basic.cHarald Welte1-71/+71
Please sumbit before 2.6.8-final, this just moves some code in order to make gcc happy. Thanks! Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-01[NET]: Update NET_SCH_NETEM Kconfig help text.Adrian Bunk1-2/+5
Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: David S. Miller <davem@redhat.com>
2004-08-01Merge bk://gkernel.bkbits.net/net-drivers-2.6Linus Torvalds1-1/+1
into ppc970.osdl.org:/home/torvalds/v2.6/linux
2004-08-01[PATCH] ethtool_get_regs copy right number of bytes to userChris Wright1-1/+1
If regs.len is smaller than reglen it's possible to copy more bytes out than the user asked for. Signed-off-by: Chris Wright <chrisw@osdl.org>
2004-07-31[IPSEC]: Fix UDP decap code.Bert Hubert1-1/+2
The missing break causes the packet to be tested against both encapsulation types, one will always fail. Signed-off-by: bert hubert <ahu@ds9a.nl> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-31[PF_KEY]: spirange should be in host byte order.Herbert Xu1-3/+3
I'm looking through the xfrm_alloc_spi stuff and noticed that the netlink alloc_spi function takes the range in host order while the PFKEY alloc_spi function takes them in network order. First I thought that I stuffed up since I was the one who changed the code in the netlink interface to take them in host order :) But reading RFC 2367 seems to indicate otherwise. It says that all fields are host order unless specified otherwise. And the spirange fields are not specified to be network order at all. Looking at the existing PFKEY users: User Space ---------- Openswan - Doesn't use PFKEY for this. Racoon - Puts zeros in there so it doesn't care. However its test-pfkey program stores things in host order. ISAKMPD - Stores things in host order. So the conclusion is that we can and should change our PFKEY implementation to use host order for these fields. This patch does exactly that. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-31[IPSEC]: xfrm_alloc_spi always succeeds on non-trivial rangeHerbert Xu1-2/+3
xfrm_alloc_spi will always succeed if minspi < maxspi, even if minspi + 1 == maxspi. If the range is already occupied this will obviously lead to breakage. Of course this is very unlikely to occur in reality due to the size of the range. Although with IPCOMP it might actually happen on a very large server. The fix is obivous. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-31[IPSEC]: Remove redundant check in xfrm_state_add()Herbert Xu1-11/+5
This is the patch referred to in the netlink_get_spi thread. I was actually wrong about the reason for this patch though. Firstly it's the SPI check that is redundant and not the find_acq() call. And it's redundant because of the find_acq() patch, not because of the fact that this is in xfrm_state_add(). Now that find_acq() only returns SAs with SPIs, we don't need to check this in xfrm_state_add() anymore. We do still need the call though to clean up leftover larval states. Another side-effect of the change is that we can move the existence check above find_acq() since find_acq() will never return any SAs matching the SPI we're trying to add (It doesn't need to because if an SA with a matching SPI existed, it would've been returned by state_lookup() already). Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-31[IPSEC]: Fix SPI generation by netlink_get_spi()Herbert Xu2-10/+4
The issue is that two successive calls to netlink_get_spi is returning the same SA. Since netlink_get_spi is meant to be a creation operation this is incorrect. The netlink_get_spi operation is modelled off the PFKEY SADB_GETSPI command which is specified in RFC 2367. The purpose of SADB_GETSPI is to create a new larval SA that can then be filled in by SADB_UPDATE. Its semantics does not allow two SADB_GETSPI calls to return the same SA, even if there is no SADB_UPDATE call in between. The reason the second netlink_get_spi is returning the same SA is because in find_acq(), the code is looking at all larval states as opposed to only larval states with an SPI of zero. Since the only other caller of find_acq() -- xfrm_state_add() intentionally ignores all return values with a non-zero SPI, it is safe to not look at SAs with non-zero SPIs at all in find_acq(). The following patch does exactly that. In fact, the find_acq() call in xfrm_state_add() is a remnant from the days when we had xfrm_state_replace() instead of xfrm_state_add() and xfrm_state_update(). It can now be safely removed. I'll post a separate patch for that. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-31Merge http://linux-mh.bkbits.net/bluetooth-2.6David S. Miller1-13/+23
into nuts.davemloft.net:/disk1/BK/net-2.6
2004-07-31[Bluetooth] Fix resetting to default filtersMarcel Holtmann1-13/+23
The problem is that after a successful connection between the Windows Bluetooth stack and the Linux Bluez stack, no packets from the device ever reach the PC running Windows XP Service Pack 2. That is, a ping from the PC never receives a response, and a ping from BlueZ never reaches the PC. Linux packet statistics show that the PC packets are received, but all return traffic seems to be routed over the loopback interface. Immediately after creating the BNEP connection with BlueZ, the Windows Bluetooth stack sends a BNEP_FILTER_NET_TYPE_SET_MSG with an effective length of zero. BlueZ interprets this message to mean that no filter ranges should be allowed. The code zeros the first entry in the filter list, which is than interpreted as meaning that no ranges of acceptable packets are available. This interpretation is wrong and leads to all packets being rejected by BNEP. The Bluetooth BNEP specification clearly states the following: The length (in octets) of this message is 4+4*N, where N is the number of disjoint ranges of Networking protocol types that form the complete set. Note that N=0 (empty set) denotes a reset to default filters (if any) supported by the remote device. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2004-07-31Merge nuts.davemloft.net:/disk1/BK/network-2.6David S. Miller4-22/+21
into nuts.davemloft.net:/disk1/BK/net-2.6
2004-07-30[PATCH] size_t portability fixesAlexander Viro3-3/+3
more size_t fixes (%d -> %zd) Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-07-30[PATCH] inline fixes in net/*Alexander Viro2-34/+33
* in ipv6/route.c: made ipv6_advmss() inlined again (and moved it up) * in sunrpc/xprt.c: inlining fix: moved do_xprt_reserve() up Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-07-30[NET]: Kill NET_FASTROUTE, does nothing and suffers from major bitrot.David S. Miller3-98/+0
Based up suggestion/changes from Jeff Garzik. Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-29Merge nuts.davemloft.net:/disk1/BK/network-2.6David S. Miller24-411/+435
into nuts.davemloft.net:/disk1/BK/net-2.6
2004-07-29Merge bk://cifs.bkbits.net/linux-2.5cifsLinus Torvalds1-2/+1
into ppc970.osdl.org:/home/torvalds/v2.6/linux
2004-07-29[IPSEC]: Move generic encap code into xfrm6_output.Herbert Xu7-255/+193
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-29[AH6]: Rearrange routing headersHerbert Xu1-1/+41
This patch rearranges the IPv6 routing header so that the destination addresses appear in the order as they would on the destination. This is specified in Appendix A2 of RFC 2402. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-29[NET]: Convert netrom to use module_param.Stephen Hemminger1-2/+2
Convert Netrom to use module_param Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-29[NET]: Convert ROSE to use module_param.Stephen Hemminger1-2/+3
Switch to module_param and the hash list can be local. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-29[NET]: Allow MD5 to be a moduleHerbert Xu3-8/+6
I found that recent 2.6 kernels no longer allowed me to build MD5 as a module even though everything that used it were modules (including ipv6 and sctp). It turns out that there were boolean options selecting MD5 in the Kconfig files. Due to limitations in the current kconfig implementation, this forces MD5 to be a boolean as well. The usual workaround in these cases is to move the selection up to the closest tristate. This is what the following patch does. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-29[PKT_SCHED]: Fix pkt_cls.h incompatabilities.Jamal Hadi Salim1-36/+77
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-29[PATCH 1/1]: net/sunrpc/xprt.c gcc341 inlining fixAndrew Morton1-15/+15
From: Mikael Pettersson <mikpe@csd.uu.se> gcc-3.4.1 errors out in 2.6.8-rc1-mm1 at net/sunrpc/xprt.c: net/sunrpc/xprt.c: In function 'xprt_reserve': net/sunrpc/xprt.c:84: sorry, unimplemented: inlining failed in call to 'do_xprt_reserve': function body not available net/sunrpc/xprt.c:1307: sorry, unimplemented: called from here make[2]: *** [net/sunrpc/xprt.o] Error 1 make[1]: *** [net/sunrpc] Error 2 make: *** [net] Error 2 do_xprt_reserve() is marked inline but used defore its function body is available. Moving it before its only caller fixes the problem. Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-29[PATCH 8/8] gcc-3.5 fixesAndrew Morton1-1/+1
From: Andi Kleen <ak@muc.de> Trivial gcc-3.5 build fixes. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-29[PATCH 3/8] gcc-3.5 fixesAndrew Morton1-1/+1
From: Andi Kleen <ak@muc.de> Trivial gcc-3.5 build fixes. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-29[BRIDGE]: RCU fixStephen Hemminger2-2/+12
Follow up to earlier RCU patch. Since now using RCU, need to use deferred free. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-29[BRIDGE]: forwarding table RCUStephen Hemminger5-36/+44
Convert the bridge forwarding database over to using RCU. This avoids a read_lock and atomic_inc/dec in the fast path of output. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-29[BRIDGE]: linkstate handlingStephen Hemminger3-25/+27
This makes bridge port status reflect both the state of the interface from software (up/down) and the carrier. It makes STP handle link failure (cable breakage, etc). The original concept comes from a Mark Ruijter <bridge@siennax.com> who implemented it differently. My way is simpler and requires no polling. Obviously, this link state detection will only work if the network card handles the events properly. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-29[BRIDGE]: dev_xmit cleanupStephen Hemminger1-24/+10
The br_dev_xmit function was broken in two pieces (needlessly). Put it back together. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-29[BRIDGE]: Propagate bridge internal MTU changesStephen Hemminger3-6/+6
Need to propagate MTU changes that the bridge does to it's pseudo interface up to others. There ends up being a double call to br_min_mtu() but that's harmless. Cleans up the EXPORT_SYMBOLS including dev_change_flags which is used by vlan. Shouldn't be basing exports on kernel config options like this. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-28[NET]: Convert pktgen to use module_paramStephen Hemminger1-4/+5
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-28Merge bk://bk.skbuff.net:20608/linux-2.6-misc/David S. Miller2-2/+6
into nuts.davemloft.net:/disk1/BK/net-2.6
2004-07-29[IPV6] add missing known icmpv6 types.Hideaki Yoshifuji1-0/+6
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
2004-07-29[IPV6] remove unused macro.Hideaki Yoshifuji1-2/+0
2004-07-28[IPSEC]: xfrm_user code forgets to call xfrm_probe_algs()Masahide Nakamura1-0/+2
Signed-off-by: Masahide Nakmura <nakam@linux-ipv6.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-28[BRIDGE]: Fix typo in br_stp.cTommi Virtanen1-1/+1
Signed-off-by: Tommi Virtanen <tv@tv.debian.net> Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-28[NET]: Remove useless variable in rtnetlink_rcv_msgPatrick McHardy1-4/+0
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-28[NET]: Kill rtnl_exlock stubs.Stephen Hemminger3-16/+1
Rtnetlink has some macro's that are relics from earlier locking. They are only used a couple of places so are easy to kill. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-28[PKT_SCHED]: de-inline qdiscipline locking functionsStephen Hemminger4-23/+51
This qdisc code has several inline functions for locking that is only used when adding/deleting queuing disciplines; so make them functions instead. The new qdisc_lock_tree encapsulates the locking used throughout this code. Also qdisc_run() is only called from net/core/dev.c so it should be defined there. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-27[AH6]: Get things working again.Herbert Xu4-16/+8
Re: [AH6] Disable mutable bits after AH header Unfortunately I broke ah6_input() in that patch. Thanks to Miyazawa-san for notifying me of the problem. In that patch I removed the nh_offset parameter to ipv6_clear_mutable_options. That broke ah6_input() because it relies on that variable to set the nexthdr. The following patch fixes this by moving this work out to the caller xfrm6_rcv() where the information is already available. It also removes an unnecessary call to ip6_find_1stfragopt() in xfrm6_rcv() since nhoffp already points to the nexthdr preceding the current header. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-27[ATM]: [lec] remove unnecessary inlines (from Adrian Bunk <bunk@fs.tum.de>)Chas Williams1-4/+4
Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-27[IPV6]: Fix gcc-341 inlining for real.Con Kolivas1-1/+1
Signed-off-by: Con Kolivas <kernel@kolivas.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-26Merge bk://linux.bkbits.net/linux-2.5Steve French1-2/+1
into hostme.bitkeeper.com:/repos/c/cifs/linux-2.5cifs
2004-07-26[PATCH] pointer-to-int conversion fixesAlexander Viro1-3/+3
Assorted pointer-to-int fixes: a) some places want to take pointer modulo alignment or extract integer that was cast to pointer (which is legitimate), but do that via wrong cast, triggering sparse warnings. b) usual %x (int)ptr -> %p ptr fixes Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-07-26[PATCH] bluetooth annotationsAlexander Viro5-57/+28
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-07-26[PATCH] appletalk SIOCADDRT fixAlexander Viro1-5/+5
blind dereferencing of userland pointer in appletalk SIOCADDRT handling. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-07-26[PATCH] size_t portability fixesAlexander Viro1-7/+7
A lot of places assumed that size_t == unsigned; on 64bit boxen that is not true. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-07-25[IPV6]: Fix route.c gcc-3.4.x inlining error.Con Kolivas1-1/+1
Fixes the inline error when compiling net/ipv6/route.c with gcc-3.4.1 Signed-off-by: Con Kolivas <kernel@kolivas.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-25[XFRM]: Wake up km_waitq once per gc-run instead of once per state.Patrick McHardy1-1/+1
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-25Cset exclude: davem@nuts.davemloft.net|ChangeSet|20040723204655|22654David S. Miller1-1/+2
2004-07-24[SCTP]: Fix mis-merge.David S. Miller1-4/+18
2004-07-24[AH6]: Replace skb by iph in clear_mutable_options.Herbert Xu1-32/+25
This patch replaces the skb argument in ipv6_clear_mutable_options() by an ipv6hdr. Doing so allows us to point skb->nh elsewhere when calling this function. I've also thrown in some obvious clean-ups for that function. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-24[AH4]: Save daddr iff options are present.Herbert Xu1-3/+4
This is a little optimisation for AH4. When I moved the tunnel code out, I put the daddr copying code on the main path which is unnecessary since daddr is only mutable if IP options are present. This patch moves the saving and restoring of daddr under the check for the existence of IP options. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-24Merge conflicts with Yoshfuji's SNMP stats changes.David S. Miller6-280/+345
2004-07-23[SCTP] Mark chunks as ineligible for fast retransmit after they areSridhar Samudrala1-2/+20
retransmitted. Also mark any chunks that could not be fit in the PMTU sized packet as ineligible for fast retransmit. Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
2004-07-23[IPVS]: Convert to module_param.Stephen Hemminger1-2/+4
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-22[PKT_SCHED]: Alpha not studly enough for SCH_CLK_CPU.David S. Miller1-2/+1
The cycle counter it provides overflows very quickly, on the order of 10 minutes, so it is not suitable for this purpose. Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-22[PKT_SCHED]: Make clock source configurablePatrick McHardy4-9/+74
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-22[AH6]: Disallow mutable bits after AH header.Herbert Xu1-54/+19
As we discussed before, mutable headers should not be allowed after the AH header. In fact, this appears to be the intention of RFC 2402. It is further clarified in section 3.1.1 of http://www.ietf.org/internet-drafts/draft-ietf-ipsec-rfc2402bis-07.txt This allows us to simplify the code in ah6.c. As a result, this also fixes the following issues: * Dependence on skb->h in ah6_output(). * Bogus clearing of auth_data of 2nd AH header in ipv6_clear_mutable_options(). Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-22[IPSEC]: Missing unlock in policy timer.Herbert Xu1-0/+1
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-22[SCTP] Fix missing '+' in the computation of sack chunk size inSridhar Samudrala1-1/+1
sctp_sm_pull_sack(). Signed-off-by: Jorge Hernandez <jhh@lucent.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
2004-07-22[SCTP] Use idr_get_new_above() with a starting id of 1 to avoid returningSridhar Samudrala1-3/+2
an associd of 0. Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
2004-07-22[SCTP] Fix issues with handling stale cookie error over multihomingSridhar Samudrala2-12/+95
associations. Signed-off-by: Jorge Hernandez <jhh@lucent.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
2004-07-22[SCTP] Fix data not being delivered to user in SHUTDOWN_SENT state.Sridhar Samudrala2-259/+201
Also cleaned up sctp_sf_eat_data_6_2() and sctp_sf_eat_data_fast_4_4() as they have a lot of common code. Signed-off-by: Jorge Hernandez <jhh@lucent.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
2004-07-22[SCTP] Set/Get default SCTP_PEER_ADDR_PARAMS for endpoint when associdSridhar Samudrala1-0/+38
and peer address are 0. Signed-off-by: Anand R. Setlur <asetlur@lucent.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
2004-07-22[PKT_SCHED]: Use get_cycles() for PSCHED_CPU clock sourcePatrick McHardy1-11/+11
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-22[PKT_SCHED]: Remove dead timer code.Patrick McHardy1-14/+1
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-22[TCP]: Do not overflow 16-bit window field in tcp_select_window().David S. Miller1-0/+8
Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-21[IPSEC]: Fix IPCOMP6 ICMP type check.Herbert Xu1-1/+1
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-21[ATM]: Update Marko Kiiskila's email address.David S. Miller3-3/+3
2004-07-21[IPV4]: Make raw sockets behave like udp wrt. MSG_TRUNC.David S. Miller2-1/+6
2004-07-21[ATM]: use try_module_get appropriately (from Stephen Hemminger ↵Chas Williams2-2/+2
<shemminger@osdl.org>)
2004-07-21Merge bk://bk.skbuff.net:20608/linux-2.6-dgramconnect/David S. Miller45-588/+776
into nuts.davemloft.net:/disk1/BK/net-2.6
2004-07-21Merge http://linux-mh.bkbits.net/bluetooth-2.6David S. Miller1-0/+1
into nuts.davemloft.net:/disk1/BK/net-2.6
2004-07-20[UDP]: Return true length if user specifies MSG_TRUNC.Samuel Thibault2-0/+6
2004-07-20[IPV6]: Missing sparse annotation in addrconf.Stephen Hemminger1-1/+1
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-20[PKT_SCHED]: Need delayed packet limit in sch_netem.Stephen Hemminger1-5/+11
The netem scheduler needs to limit its delayed packet queue to prevent a application burst from chewing up too much memory. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-20[PKT_SCHED]: Missing qdisc destroy in sch_netem.Stephen Hemminger1-0/+3
The underlying qdisc was not being properly destroyed, shows up as assertion failure on device removal. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-20[PKT_SCHED]: Make sch_netem classful.Stephen Hemminger1-0/+87
Simple enhancement to netem packet scheduler that makes it classful so that the underlying pfifo default discipline can be substituted with something else (tbf, red, ...) Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-20[IPV4] Look up route with appropriate protocol when we connect().Hideaki Yoshifuji7-207/+235
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
2004-07-20Merge bk://bk.skbuff.net:20608/linux-2.6-snmp-20040708David S. Miller42-582/+667
into nuts.davemloft.net:/disk1/BK/snmp-2.6
2004-07-16[Bluetooth] Add missing entry for the HIDP supportMarcel Holtmann1-0/+1
This small patch adds the missing entry about the HIDP support to the main Kconfig file of the Bluetooth subsystem. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2004-07-15[PATCH] sparse: iovec cleanups - the restAlexander Viro3-75/+21
the rest of iovec cleanups: nbd, dvb-net, sock.c::sock_no_sendpage(), econet over udp and ip_vs switched to use of kvec and kernel_...msg().
2004-07-15[PATCH] sparse: iovec cleanups - sunrpc, nfs and nfsdAlexander Viro6-69/+56
sunrpc, nfs and nfsd switched to use of kvec and kernel_...msg()
2004-07-15[PATCH] sparse: iovec cleanups - rxrpcAlexander Viro2-32/+5
rxrpc (low-level part of afs) switched to kernel_...msg(); it already was using kvec instead of iovec.
2004-07-15[PATCH] sparse: beginning of iovec cleanups - infrastructureAlexander Viro1-0/+38
Beginning of iovec cleanups - added two helpers (kernel_{send,recv}msg) that do sock_sendmsg/sock_recvmsg with kvec instead of iovec; basically, they were abstracted from earlier afs patch. They take kvec/length of kvec as separate arguments, do set_fs(), stick kvec into msghdr and call sock_...msg(). The next group of patches will switch network filesystems to use of kvec for kernel data + use of these helpers. Basically, the same thing we'd done for afs.
2004-07-15[PATCH] Remove all uses of '#ifdef MODULE_PARM' from kernelMika Kukkonen6-12/+0
I got sidetracked (I do that a lot ;-) and noticed that there are only eight files in 2.6 that have code like: #ifdef MODULE_PARAM MODULE_PARAM(foo, "i"); #endif which I think is old cruft from 2.1.x times. Following patch removes all those eight (six in netfilter, one net driver and one SCSI driver).
2004-07-13[PATCH] Fix 'unsigned' < 0 checksMika Kukkonen1-1/+2
Using "-W" found a few places that should probably use signed variables since they can contain (and check for) negative error values.
2004-07-13[PATCH] sparse: (ipv6/netfilter) initializer fixAlexander Viro1-1/+1
Missing '=' in C99 initializer
2004-07-13[PATCH] sparse: read_descriptor_t annotationAlexander Viro1-2/+2
We have a fun situation with read_descriptor_t - all its instances end up passed to some actor; these actors use desc->buf as their private data; there are 5 of them and they expect resp: struct lo_read_data * struct svc_rqst * struct file * struct rpc_xprt * char __user * IOW, there is no type safety whatsoever; the field is essentially untyped, we rely on the fact that actor is chosen by the same code that sets ->buf and expect it to put something of the right type there. Right now desc->buf is declared as char __user *. Moreover, the last argument of ->sendfile() (what should be stored in ->buf) is void __user *, even though it's actually _never_ a userland pointer. If nothing else, ->sendfile() should take void * instead; that alone removes a bunch of bogus warnings. I went further and replaced desc->buf with a union of void * and char __user *.
2004-07-12[PATCH] sparse: net/* NULL noise removalAlexander Viro17-59/+59
2004-07-12[PATCH] sparse: switching afs to kvecAlexander Viro3-9/+17
- afs and rxrpc switched to kvec; definition of kvec moved to uio.h (duh). - afs/mntpt.c got missing cast added. at that point afs is sparse-clean and rxrpc has only one remaining warning (setsockopt from local variable, protected by set_fs()).
2004-07-11[NETFILTER]: Add timestamping to ipt_ULOGMartin Josefsson1-0/+4
After Andi's timestamp optimizations we don't have any timestamps on the packets unless someone requested them. Here's a patch for 2.6 to explicitly timestamp the packets before we log them. Harald approved it some time ago, he's pretty busy so I'm sending it instead. Signed-off-by: Martin Josefsson <gandalf@netfilter.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-11[SPARSE]: Fix warnings in net/sctp/Andrew Morton8-126/+122
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-11[IPV4]: Remove no longer available URL.Adrian Bunk1-2/+1
This patch solves Bugzilla #2445 by removing a no longer available URL from the help text for NET_IPIP. Noted by Nils Hammar <m4341@bedug.com>. Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-11Merge nuts.davemloft.net:/disk1/BK/network-2.6David S. Miller1-1/+1
into nuts.davemloft.net:/disk1/BK/net-2.6
2004-07-10[PATCH] crc16 kconfig touchupsAndrew Morton1-1/+1
drivers/net/hamradio/Kconfig:116:warning: 'select' used by config symbol 'BAYCOM_SER_FDX' refer to undefined symbol 'CRC16' drivers/net/hamradio/Kconfig:136:warning: 'select' used by config symbol 'BAYCOM_SER_HDX' refer to undefined symbol 'CRC16' drivers/net/hamradio/Kconfig:154:warning: 'select' used by config symbol 'BAYCOM_PAR' refer to undefined symbol 'CRC16' drivers/net/hamradio/Kconfig:169:warning: 'select' used by config symbol 'BAYCOM_EPP' refer to undefined symbol 'CRC16' net/irda/Kconfig:8:warning: 'select' used by config symbol 'IRDA' refer to undefined symbol 'CRC16' drivers/net/Kconfig:1749:warning: 'select' used by config symbol 'VIA_VELOCITY' refer to undefined symbol 'CRC16' drivers/net/Kconfig:2465:warning: 'select' used by config symbol 'PPP_ASYNC' refer to undefined symbol 'CRC16' drivers/isdn/hisax/Kconfig:403:warning: 'select' used by config symbol 'HISAX_ST5481' refer to undefined symbol 'CRC16' drivers/isdn/hisax/Kconfig:7:warning: 'select' used by config symbol 'ISDN_DRV_HISAX' refer to undefined symbol 'CRC16' drivers/isdn/tpam/Kconfig:7:warning: 'select' used by config symbol 'ISDN_DRV_TPAM' refer to undefined symbol 'CRC16' Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-07-09[IPCOMP6]: Exclude IPCOMP header from props.header_lenHerbert Xu1-13/+5
Now that the IPv4 encap stuff is out of the way, I'll be sending you the IPv6 versions. Here is the one to remove the unnecessary extra space reserved for IPCOMP. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Yoshifuji Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-09[IPSEC]: Move generic encap code into xfrm4_outputHerbert Xu7-242/+163
I've finally finished merging the general encapsulation code for IPv4. Here is the patch. The idea is basically to make x->type->output similar in structure to x->type->input. That means moving the tunnel encapsulation and other generic code out. They have ended up in xfrm4_output.c. The advantage of this is that we have exactly one copy of the tunnel encapsulation code. So if we need to change it (e.g., set the TTL according to the route) then it's easier and less error-prone. In fact, in doing so I've already noticed that the ECN wasn't being copied correctly in everything except xfrm4_tunnel. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-10[Bluetooth] Respond to L2CAP info requestsMarcel Holtmann1-12/+46
This patch adds the correct behavior when a L2CAP info request is sent by the peer. The answer should be a L2CAP info response with the result code set to "not supported". Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2004-07-09Merge http://linux-mh.bkbits.net/bluetooth-2.6David S. Miller1-12/+46
into nuts.davemloft.net:/disk1/BK/net-2.6
2004-07-09[IPSEC]: Fix uh->len when doing NATT with IP options.Herbert Xu1-1/+1
I just noticed that the UDP header length in esp4_output() is incorrect when IP options are present (in transport mode). This patch fixes exactly that. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-09[XFRM]: Add FLUSHSA and FLUSHPOLICY.Herbert Xu1-0/+20
This patch adds FLUSHSA and FLUSHPOLICY to xfrm_user which are analagous to SADB_FLUSH and SADB_X_SPDFLUSH in af_key. This is useful in KMs on startup/shutdown so that the system is reset to a known state. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-09[PKT_SCHED]: Add jitter support to netem.Stephen Hemminger1-74/+676
This patch adds jitter if desired to the delayed packets in the netem scheduler. I dropped the rate stuff out and reorganized so that an underlying pfifo queue is used (next plan is to make it have class ops). The jitter is given as sigma to a Gaussian normal distribution. The actual implementation is a reduced form of the table driven stuff in NISTnet (free). Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-09[BRIDGE]: Support different MTU sizes.Stephen Hemminger5-0/+36
This patch adds support for different size MTU's to bridging. It is useful for bridging Ethernet's with jumbo frames, etc. The mtu of the bridge pseudo-device is maintained as the minimum of all the underlying ports. And when forwarding a frame through the bridge, it will drop the frame if the outgoing port's MTU is less than the frame size (as per 802 standard). Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-09[PKT_SCHED]: Remove CSZ scheduler.David S. Miller3-1071/+0
It was an experimental hack and never finished off. Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-09[NET] use seq_puts() where appropriate.Hideaki Yoshifuji4-11/+11
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
2004-07-09[NET] use SNMP_MIB_ITEM for MIB description.Hideaki Yoshifuji2-99/+204
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
2004-07-09[NET] convert storage for MIB from struct member to array item.Hideaki Yoshifuji39-493/+473
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
2004-07-08[IPV4]: Fix multicast socket hangs.David S. Miller1-6/+0
If a multicast packet gets looped back, the sending socket can hang if a local read just sits and does not empty its receive queue. The problem is that when an SKB clone is freed up, the destructor is only invoked for the head SKB when there is a fraglist (which is created for fragmentation). The solution is to account the fragment list SKB lengths in the top-level head SKB, then it all works out. Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-07[TCP]: Do not round window to MSS if window scaling.John Heffner1-9/+24
Signed-off-by: John Heffner <jheffner@psc.edu> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-07[NET]: Cleanup mis-usage of seq_release_privateHirofumi Ogawa4-4/+4
These doesn't allocate memory and doesn't use seq->private. However kfree() ignores NULL, so these are not the problem. This patch just cleans these up. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-07[IPV4]: IPMR fixes.Hirofumi Ogawa1-3/+7
- pim_protocol warning fix - ipmr_vif_open() and ipmr_mfc_open() allocates the memory, so it should use seq_release_private(). - ipmr_mfc_seq_xxx is using it->cache, in order to control whether unlock should be do or not, but it->cache was not initialized in ipmr_mfc_seq_start(). So it can point the previous state if user did seek(). This become to the cause of twice unlock. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-07[NET]: Deinline sock_i_uid, sock_i_inoStephen Hemminger1-0/+23
The sock_i_uid and sock_i_ino functions are only called by /proc type interfaces, so they don't need to be inlined. Also, the inline functions writeable, rcvtimeo, sndtimeo are test for value functions that don't change their argument. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-07[NETFILTER]: Fix two broken checks for options in ipt_LOGPatrick McHardy1-2/+2
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-06[IPV4]: Set UDP accept back to sock_no_accept.David S. Miller1-1/+1
Setting it to inet_accept causes UDP accept attempts to OOPS. In particular, accept01 from LTP tries this. Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-06[PKT_SCHED]: Kill fix_u32_bug ifdef tests in cls_u32.cDavid S. Miller1-6/+0
2004-07-06[PKT_SCHED]: Kill CONFIG_CLS_U32_PERF2 cruft code.David S. Miller1-3/+0
2004-07-06[PKT_SCHED]: New version of u32 classifier hashing workaround.Jamal Hadi Salim1-4/+16
This version does not change user visible structures. Signed-off-by: Jamal Hadi Salim <hadi@znyx.com> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-06[PKT_SCHED]: Another missed qdisc_copy_stats() conversion.David S. Miller1-1/+2
2004-07-06[PKT_SCHED]: Two small netem fixes.Stephen Hemminger1-1/+2
- rtnetlink.h needs including - optimize loss test so that net_random() call is not done when no-loss is indicated Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-06[PKT_SCHED]: Fix some missing qdisc_copy_stats() conversions.David S. Miller3-3/+6
2004-07-06[IPCOMP]: Exclude IPCOMP header from props.header_lenHerbert Xu1-14/+6
This is another patch on the way towards a unified XFRM tunnel encapsulation function. This patch changes the value of props.header_len for IPCOMP to exclude the IPCOMP header. The reason is that the IPCOMP header is added only if the packet is compressible. That is, if the size of the compressed payload plus the size of the IPCOMP header is less than that of the original payload. This means that the IPCOMP encapsulation does not impose any overhead at all as far as the MTU is concerned. The current code incorrectly reduces the MTU by the size of the IPCOMP header. As a side-effect, this means that we don't have to move the IP header around when IPCOMP is used. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-05[PKT_SCHED]: Update to network emulation QOS scheduler.Stephen Hemminger4-286/+260
This patch updates the network emulation packet scheduler. * name changed from delay to netem since it does more than just delay * Catalin's merged code to do packet reordering * uses a socket queue's directly rather than layering on qdisc(fifo) because this is used in performance tests. * adds placeholder in API for future enhancements (rate and duplicate). Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-05[NETFILTER]: ip6t_LOG and packets with hop-by-hop options.Marcel Sebek1-5/+4
Packet with IPPROTO_HOPOPTS extended header isn't logged properly by ip6t_LOG.c. It only prints PROTO=0 and nothing more, because IPPROTO_HOPOPTS=0 and in this file 0 is used to indicate last header. This patch fix it by using IPPROTO_NONE to indicate last header. Signed-off-by: Marcel Sebek <sebek64@post.cz> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-05[NETFILTER]: Fix initializer of ip6table.c:initial_tableDavid S. Miller1-37/+66
Just because gcc accepts [index] bar as [index] = bar is no reason to make use of that gross construct. Also fully C99ify
2004-07-05[PKT_SCHED]: Do not embed spinlock in tc_stats structure.David S. Miller8-30/+42
This makes it not get sized/copied around to/from userspace correctly. The real crux of the problem comes from the rtnetlink attribute copying line which read: RTA_PUT(skb, TCA_STATS, (char*)&st->lock - (char*)st, st); which is not necessarily sizeof(struct tc_stats) due to alignment issues.
2004-07-05[NET]: Save space for dst underflow message.Hideaki Yoshifuji1-0/+3
Save space for 'dst underflow' message. Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-05[IPV6]: Fix flags for ndisc dst.Hideaki Yoshifuji1-3/+8
Because RTF_LOCAL is for local unicast address, it was wrong to set RTF_LOCAL to ndisc dst. This patch also adds some comment on other fields. Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-05[VLAN]: Do not access released memory.Petr Vandrovec1-1/+1
2004-07-05Merge http://linux-mh.bkbits.net/bluetooth-2.6David S. Miller11-11/+1016
into nuts.davemloft.net:/disk1/BK/net-2.6
2004-07-05[IPV6] Bring lo up before setting other interface up.Hideaki Yoshifuji1-0/+7
IPv6 was not configured appropriately without lo. Noticed by / tested by Russell King <rmk+lkml@arm.linux.org.uk>. Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-05[AH4]: Harmonization of output function.Herbert Xu1-20/+18
This is another step towards the union of the tunnel mode encapsulation between transforms. As there are significant differences between the tunnel encapsulation of IPv4 and IPv6, I'll be dealing with IPv4 only for now. This particular patch rearranges the code in ah_output to isolate the tunnel mode encapsulation. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-05[AX25]: ax25_rt_add() locking fix.Andrew Morton1-0/+1
Fix deadlock identified by the Stanford locking checker. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-05[LAPB]: lapb_unregister() locking fix.Andrew Morton1-1/+1
Fix deadlock identified by the Stanford locking checker. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-05[AX25]: ax25_ds_idletimer_expiry() locking fix.Andrew Morton1-1/+1
Fix deadlock identified by the Stanford locking checker. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-05[ROSE]: rose_route locking fixAndrew Morton1-1/+0
Fix deadlock in rose_del_loopback_node(). Found by the Stanford locking checker. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-05[ESP4]: Merge NAT-T code in esp_output().Herbert Xu1-43/+22
2004-07-05[NETLINK]: Return err in netlink_connect.Herbert Xu1-1/+1
This patch makes netlink_connect() return the value of err instead of 0. It doesn't actually make any difference since the current implementation of netlink_autobind() never fails. But since we went to all this trouble to check the return status of autobind, might as well return the correct value :) Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-05[NETLINK]: Check connect address.Herbert Xu1-1/+5
2004-07-05[IPV4]: Calculate default broadcast even when using SIOCSIGNETMASK.Jaap Keuter1-0/+14
While getting hands-on with netkit (www.netkit.org), a networking simulation environment based on UML, it struck me that ifconfig wasn't capable of calculating the proper broadcast address for a subnetted interface. Some browsing through newsgroups and on the Debian package site (nettools), showed that this leads to misconfigured interfaces and a couple of bugreports on ifconfig. Digging a bit deeper revealed that it actually is an issue with SIOIFNETMASK. Once you bring up an interface with SIOIFADDR, a classfull netmask and broadcast address is set (if applicable for the type of interface), in order to get a properly configured interface. But if you subnet the network using SIOIFNETMASK no proper broadcast address is set. So you always have to calculate it yourself, obviously leading to configuration errors. This patch takes care of this. First of all it doesn't change existing functionality, eg. a command like 'ifconfig eth0 192.168.1.1 netmask 255.255.255.240 broadcast 192.168.1.0' still works. But if you omit the broadcast address, a proper 'all ones' broadcast address for the subnet is set. 'ifconfig eth0 192.168.1.1 netmask 255.255.255.240' gives you 'eth0 inet addr:192.168.1.1 Bcast:192.168.1.15 Mask:255.255.255.240' and this should solve some real life problems. Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-05[PKT_SCHED]: Rip out requeue stat addition, user ABI breaker.David S. Miller3-9/+0
2004-07-05[PKT_SCHED]: Pass NET_XMIT_* status properly back through classifiers.Jamal Hadi Salim4-31/+151
2004-07-04[PATCH] gcc 3.5 fixesAnton Blanchard2-2/+2
gcc 3.5 is warning about static vs non static function declarations. The following patch removes function prototypes in .h files where possible and changes prototypes to be static elsewhere. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-07-04[Bluetooth] Allocate protocol number for AVDTP supportMarcel Holtmann1-2/+2
This patch allocates the next free protocol number for the upcoming AVDTP support. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2004-07-04[Bluetooth] Add HID protocol supportMarcel Holtmann7-0/+1005
This patch adds support for the Bluetooth HID protocol to the Bluetooth subsystem. Currently only the boot mode is supported. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2004-07-04[Bluetooth] Change inquiry_cache to hci_inquiry_cacheMarcel Holtmann3-8/+8
This patch changes the inquiry_* functions to be either local to hci_core.c or change name from inquiry_cache_lookup to hci_inquiry_cache_lookup to try and reduce the potential for namespace conflicts. There could be USB or SCSI or other code that uses an inquiry_cache. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2004-07-02[PATCH] sparse: remaining integer zero / NULL fixes in allmodconfig & vmlinuxMika Kukkonen1-11/+11
This fixes the the remaining 0 to NULL things that were found with 'make allmodconfig' and 'make C=1 vmlinux'.
2004-07-01Merge davem@nuts.davemloft.net:/disk1/BK/net-2.6David S. Miller8-43/+43
into kernel.bkbits.net:/home/davem/net-2.6
2004-06-30[TCP]: TCP acts like it is always out of memory.Stephen Hemminger3-6/+6
Current 2.6.7 tree acts as if it is alway under memory pressure because a recent change did a s/tcp_memory_pressure/tcp_prot.memory_pressure/. The problem is tcp_prot.memory_pressure is a pointer, so it is always non-zero! Rather than using *tcp_prot.memory_pressure, just go back to looking at tcp_memory_pressure. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-06-30[PATCH] sparse: NULL vs 0 - net/*Mika Kukkonen8-43/+43
2004-06-30[IPV4]: Bootp packet extension area is variable length.David S. Miller1-3/+8
1) Remove the magic 300 constant 2) Allow b->exten area to be zero or more variable bytes in length. Signed-off-by: David S. Miller <davem@redhat.com>
2004-06-30[NETFILTER]: Fix opt[] to be array of u_int8_t in tcp_find_option().Adam Osuchowski1-1/+1
2004-06-29sparse: get rid of more integer/pointer confusionLinus Torvalds6-9/+9
Use NULL, not 0, where appropriate.