patch-2.3.49 linux/net/decnet/dn_nsp_out.c
Next file: linux/net/decnet/dn_route.c
Previous file: linux/net/decnet/dn_nsp_in.c
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Thu Mar 2 10:13:17 2000
- Orig file:
v2.3.48/linux/net/decnet/dn_nsp_out.c
- Orig date:
Tue Jan 11 22:31:46 2000
diff -u --recursive --new-file v2.3.48/linux/net/decnet/dn_nsp_out.c linux/net/decnet/dn_nsp_out.c
@@ -19,6 +19,7 @@
* Moved output state machine into one function
* Steve Whitehouse: New output state machine
* Paul Koning: Connect Confirm message fix.
+ * Eduardo Serrat: Fix to stop dn_nsp_do_disc() sending malformed packets.
*/
/******************************************************************************
@@ -510,7 +511,7 @@
int ddl, unsigned char *dd, __u16 rem, __u16 loc)
{
struct sk_buff *skb = NULL;
- int size = 7 + (ddl ? (ddl + 1) : 0);
+ int size = 8 + ddl;
unsigned char *msg;
if ((dst == NULL) || (rem == 0)) {
@@ -530,9 +531,9 @@
msg += 2;
*(__u16 *)msg = dn_htons(reason);
msg += 2;
+ *msg++ = ddl;
if (ddl) {
- *msg++ = ddl;
memcpy(msg, dd, ddl);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)