patch-1.3.44 linux/net/ipx/af_ipx.c
Next file: linux/net/netrom/nr_dev.c
Previous file: linux/net/ipv4/udp.c
Back to the patch index
Back to the overall index
- Lines: 37
- Date:
Fri Nov 24 16:39:54 1995
- Orig file:
v1.3.43/linux/net/ipx/af_ipx.c
- Orig date:
Fri Nov 17 08:42:34 1995
diff -u --recursive --new-file v1.3.43/linux/net/ipx/af_ipx.c linux/net/ipx/af_ipx.c
@@ -390,7 +390,19 @@
* that skb1 and skb2 point to it (them) so that it (they) can be
* demuxed to sock1 and/or sock2. If we are unable to make enough
* copies, we do as much as is possible.
+ *
+ * Firstly stop charging the sender for the space. We will
+ * charge the recipient or discard. If we are called from ipx_rcv
+ * this is ok as no socket owns an input buffer.
*/
+
+ if(skb->sk)
+ {
+ skb->sk->wmem_alloc -= skb->truesize; /* Adjust */
+ skb->sk=NULL; /* Disown */
+ }
+
+
if (copy) {
skb1 = skb_clone(skb, GFP_ATOMIC);
if (skb1 != NULL) {
@@ -529,14 +541,14 @@
/* set up data link and physical headers */
skb->dev = dev;
dl->datalink_header(dl, skb, dest_node);
-
+#ifdef ALREADY_DONE_GUV
if (skb->sk != NULL) {
/* This is an outbound packet from this host. We need to
* increment the write count.
*/
skb->sk->wmem_alloc += skb->truesize;
}
-
+#endif
#if 0
/* Now log the packet just before transmission */
dump_pkt("IPX snd:", (ipx_packet *)skb->h.raw);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this