summaryrefslogtreecommitdiffstats
path: root/net/decnet/dn_nsp_out.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-13 20:55:15 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-13 20:55:15 +0000
commit1471f525455788c20b130690e0f104df451aeb43 (patch)
tree3778beba56558beb9a9548ea5b467e9c44ea966f /net/decnet/dn_nsp_out.c
parente80d2c5456d30ebba5b0eb8a9d33e17d815d4d83 (diff)
Merge with Linux 2.3.51.
Diffstat (limited to 'net/decnet/dn_nsp_out.c')
-rw-r--r--net/decnet/dn_nsp_out.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c
index e4d0adad3..ebbf4163f 100644
--- a/net/decnet/dn_nsp_out.c
+++ b/net/decnet/dn_nsp_out.c
@@ -511,7 +511,7 @@ static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg,
int ddl, unsigned char *dd, __u16 rem, __u16 loc)
{
struct sk_buff *skb = NULL;
- int size = 8 + ddl;
+ int size = 7 + ddl + ((msgflg == NSP_DISCINIT) ? 1 : 0);
unsigned char *msg;
if ((dst == NULL) || (rem == 0)) {
@@ -531,7 +531,8 @@ static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg,
msg += 2;
*(__u16 *)msg = dn_htons(reason);
msg += 2;
- *msg++ = ddl;
+ if (msgflg == NSP_DISCINIT)
+ *msg++ = ddl;
if (ddl) {
memcpy(msg, dd, ddl);