patch-2.1.11 linux/net/ipv6/udp.c
Next file: linux/net/ipx/af_ipx.c
Previous file: linux/net/ipv6/tcp_ipv6.c
Back to the patch index
Back to the overall index
- Lines: 15
- Date:
Mon Nov 18 11:31:36 1996
- Orig file:
v2.1.10/linux/net/ipv6/udp.c
- Orig date:
Fri Nov 15 23:49:12 1996
diff -u --recursive --new-file v2.1.10/linux/net/ipv6/udp.c linux/net/ipv6/udp.c
@@ -192,7 +192,13 @@
return err;
truesize = skb->tail - skb->h.raw - sizeof(struct udphdr);
- copied = min(len, truesize);
+
+ copied=truesize;
+ if(copied>len)
+ {
+ copied=len;
+ msg->msg_flags|=MSG_TRUNC;
+ }
/*
* FIXME : should use udp header size info value
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov