summaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
authorJon Paul Maloy2015-11-19 20:30:40 +0100
committerDavid S. Miller2015-11-20 20:06:09 +0100
commitc7cad0d6f70cd4ce8644ffe528a4df1cdc2e77f5 (patch)
tree7a9152f5bfc20252055295f49230c7e774c1dfc5 /net/tipc/link.c
parentMerge branch 'bnx2x-stats' (diff)
downloadkernel-qcow2-linux-c7cad0d6f70cd4ce8644ffe528a4df1cdc2e77f5.tar.gz
kernel-qcow2-linux-c7cad0d6f70cd4ce8644ffe528a4df1cdc2e77f5.tar.xz
kernel-qcow2-linux-c7cad0d6f70cd4ce8644ffe528a4df1cdc2e77f5.zip
tipc: move linearization of buffers to generic code
In commit 5cbb28a4bf65c7e4 ("tipc: linearize arriving NAME_DISTR and LINK_PROTO buffers") we added linearization of NAME_DISTRIBUTOR, LINK_PROTOCOL/RESET and LINK_PROTOCOL/ACTIVATE to the function tipc_udp_recv(). The location of the change was selected in order to make the commit easily appliable to 'net' and 'stable'. We now move this linearization to where it should be done, in the functions tipc_named_rcv() and tipc_link_proto_rcv() respectively. Reviewed-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r--net/tipc/link.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 9efbdbde2b08..fa452fb5f34e 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1260,6 +1260,8 @@ static int tipc_link_proto_rcv(struct tipc_link *l, struct sk_buff *skb,
/* fall thru' */
case ACTIVATE_MSG:
+ skb_linearize(skb);
+ hdr = buf_msg(skb);
/* Complete own link name with peer's interface name */
if_name = strrchr(l->name, ':') + 1;