diff options
Diffstat (limited to 'net/decnet/dn_nsp_in.c')
-rw-r--r-- | net/decnet/dn_nsp_in.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/decnet/dn_nsp_in.c b/net/decnet/dn_nsp_in.c index d9498a165acf..4074a6e5d0de 100644 --- a/net/decnet/dn_nsp_in.c +++ b/net/decnet/dn_nsp_in.c | |||
@@ -362,7 +362,8 @@ static void dn_nsp_conn_conf(struct sock *sk, struct sk_buff *skb) | |||
362 | u16 dlen = *skb->data; | 362 | u16 dlen = *skb->data; |
363 | if ((dlen <= 16) && (dlen <= skb->len)) { | 363 | if ((dlen <= 16) && (dlen <= skb->len)) { |
364 | scp->conndata_in.opt_optl = dn_htons(dlen); | 364 | scp->conndata_in.opt_optl = dn_htons(dlen); |
365 | memcpy(scp->conndata_in.opt_data, skb->data + 1, dlen); | 365 | skb_copy_from_linear_data_offset(skb, 1, |
366 | scp->conndata_in.opt_data, dlen); | ||
366 | } | 367 | } |
367 | } | 368 | } |
368 | dn_nsp_send_link(sk, DN_NOCHANGE, 0); | 369 | dn_nsp_send_link(sk, DN_NOCHANGE, 0); |
@@ -406,7 +407,7 @@ static void dn_nsp_disc_init(struct sock *sk, struct sk_buff *skb) | |||
406 | u16 dlen = *skb->data; | 407 | u16 dlen = *skb->data; |
407 | if ((dlen <= 16) && (dlen <= skb->len)) { | 408 | if ((dlen <= 16) && (dlen <= skb->len)) { |
408 | scp->discdata_in.opt_optl = dn_htons(dlen); | 409 | scp->discdata_in.opt_optl = dn_htons(dlen); |
409 | memcpy(scp->discdata_in.opt_data, skb->data + 1, dlen); | 410 | skb_copy_from_linear_data_offset(skb, 1, scp->discdata_in.opt_data, dlen); |
410 | } | 411 | } |
411 | } | 412 | } |
412 | 413 | ||