summaryrefslogtreecommitdiffstats
path: root/net/netrom/af_netrom.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-14 21:04:34 -0300
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:25:59 -0700
commiteeeb03745bf9ea352df2373b9cb5fa14e60a2de0 (patch)
treee3b66df5536f04b81f0f2432399785931f20263d /net/netrom/af_netrom.c
parentac6d141dc7d1d0eeec850d1b451dca83ce649684 (diff)
downloadop-kernel-dev-eeeb03745bf9ea352df2373b9cb5fa14e60a2de0.zip
op-kernel-dev-eeeb03745bf9ea352df2373b9cb5fa14e60a2de0.tar.gz
[SK_BUFF]: More skb_put related conversions to skb_reset_transport_header
This is similar to the skb_reset_network_header(), i.e. at the point we reset the transport header pointer/offset skb->tail is equal to skb->data. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netrom/af_netrom.c')
-rw-r--r--net/netrom/af_netrom.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 8d0f30a..053fa26 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -1074,6 +1074,7 @@ static int nr_sendmsg(struct kiocb *iocb, struct socket *sock,
goto out;
skb_reserve(skb, size - len);
+ skb_reset_transport_header(skb);
/*
* Push down the NET/ROM header
@@ -1094,14 +1095,12 @@ static int nr_sendmsg(struct kiocb *iocb, struct socket *sock,
/*
* Put the data on the end
*/
+ skb_put(skb, len);
- skb->h.raw = skb_put(skb, len);
-
- asmptr = skb->h.raw;
SOCK_DEBUG(sk, "NET/ROM: Appending user data\n");
/* User data follows immediately after the NET/ROM transport header */
- if (memcpy_fromiovec(asmptr, msg->msg_iov, len)) {
+ if (memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len)) {
kfree_skb(skb);
err = -EFAULT;
goto out;
OpenPOWER on IntegriCloud