Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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`
|
|
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>
|
|
|
|
Signed-off-by: Pawel Sikora <pluto@pld-linux.org>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
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.
|
|
- 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).
|
|
remove the run-time tests for it.
|
|
Remove the test from the socket code, now that it's no
longer necessary.
|
|
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.
|
|
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
|
|
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
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>
|
|
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
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>
|
|
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
into nuts.davemloft.net:/disk1/BK/net-2.6
|
|
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>
|
|
Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
into ppc970.osdl.org:/home/torvalds/v2.6/linux
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
into nuts.davemloft.net:/disk1/BK/net-2.6
|
|
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>
|
|
into nuts.davemloft.net:/disk1/BK/net-2.6
|
|
more size_t fixes (%d -> %zd)
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
* 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>
|
|
Based up suggestion/changes from Jeff Garzik.
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
into nuts.davemloft.net:/disk1/BK/net-2.6
|
|
into ppc970.osdl.org:/home/torvalds/v2.6/linux
|
|
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
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>
|
|
Convert Netrom to use module_param
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
into nuts.davemloft.net:/disk1/BK/net-2.6
|
|
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
|
|
|
|
Signed-off-by: Masahide Nakmura <nakam@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
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>
|
|
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
into hostme.bitkeeper.com:/repos/c/cifs/linux-2.5cifs
|
|
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>
|
|
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
blind dereferencing of userland pointer in appletalk SIOCADDRT handling.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
A lot of places assumed that size_t == unsigned; on 64bit boxen that is not
true.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
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>
|
|
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
|
|
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
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>
|
|
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
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>
|
|
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
sctp_sm_pull_sack().
Signed-off-by: Jorge Hernandez <jhh@lucent.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
|
|
an associd of 0.
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
|
|
associations.
Signed-off-by: Jorge Hernandez <jhh@lucent.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
|
|
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>
|
|
and peer address are 0.
Signed-off-by: Anand R. Setlur <asetlur@lucent.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
|
|
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
|
|
|
|
<shemminger@osdl.org>)
|
|
into nuts.davemloft.net:/disk1/BK/net-2.6
|
|
into nuts.davemloft.net:/disk1/BK/net-2.6
|
|
|
|
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
|
|
into nuts.davemloft.net:/disk1/BK/snmp-2.6
|
|
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>
|
|
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().
|
|
sunrpc, nfs and nfsd switched to use of kvec and kernel_...msg()
|
|
rxrpc (low-level part of afs) switched to kernel_...msg(); it already was
using kvec instead of iovec.
|
|
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.
|
|
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).
|
|
Using "-W" found a few places that should probably use signed
variables since they can contain (and check for) negative error
values.
|
|
Missing '=' in C99 initializer
|
|
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 *.
|
|
|
|
- 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()).
|
|
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>
|
|
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
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>
|
|
into nuts.davemloft.net:/disk1/BK/net-2.6
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
into nuts.davemloft.net:/disk1/BK/net-2.6
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
It was an experimental hack and never finished off.
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
|
|
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
|
|
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
|
|
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>
|
|
Signed-off-by: John Heffner <jheffner@psc.edu>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
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>
|
|
- 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>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
|
|
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>
|
|
|
|
- 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>
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
Just because gcc accepts [index] bar as
[index] = bar is no reason to make use of
that gross construct.
Also fully C99ify
|
|
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.
|
|
Save space for 'dst underflow' message.
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
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>
|
|
|
|
into nuts.davemloft.net:/disk1/BK/net-2.6
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
|
|
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>
|
|
|
|
|
|
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>
|
|
This patch allocates the next free protocol number for the upcoming
AVDTP support.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
|
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>
|
|
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>
|
|
This fixes the the remaining 0 to NULL things that were found with 'make
allmodconfig' and 'make C=1 vmlinux'.
|
|
into kernel.bkbits.net:/home/davem/net-2.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>
|
|
|
|
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>
|
|
|
|
Use NULL, not 0, where appropriate.
|