aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/link.c2
-rw-r--r--net/tipc/name_distr.c1
-rw-r--r--net/tipc/udp_media.c5
3 files changed, 3 insertions, 5 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,
1260 /* fall thru' */ 1260 /* fall thru' */
1261 1261
1262 case ACTIVATE_MSG: 1262 case ACTIVATE_MSG:
1263 skb_linearize(skb);
1264 hdr = buf_msg(skb);
1263 1265
1264 /* Complete own link name with peer's interface name */ 1266 /* Complete own link name with peer's interface name */
1265 if_name = strrchr(l->name, ':') + 1; 1267 if_name = strrchr(l->name, ':') + 1;
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c
index c07612bab95c..f51c8bdbea1c 100644
--- a/net/tipc/name_distr.c
+++ b/net/tipc/name_distr.c
@@ -397,6 +397,7 @@ void tipc_named_rcv(struct net *net, struct sk_buff_head *inputq)
397 397
398 spin_lock_bh(&tn->nametbl_lock); 398 spin_lock_bh(&tn->nametbl_lock);
399 for (skb = skb_dequeue(inputq); skb; skb = skb_dequeue(inputq)) { 399 for (skb = skb_dequeue(inputq); skb; skb = skb_dequeue(inputq)) {
400 skb_linearize(skb);
400 msg = buf_msg(skb); 401 msg = buf_msg(skb);
401 mtype = msg_type(msg); 402 mtype = msg_type(msg);
402 item = (struct distr_item *)msg_data(msg); 403 item = (struct distr_item *)msg_data(msg);
diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c
index ad2719ad4c1b..816914ef228d 100644
--- a/net/tipc/udp_media.c
+++ b/net/tipc/udp_media.c
@@ -48,7 +48,6 @@
48#include <linux/tipc_netlink.h> 48#include <linux/tipc_netlink.h>
49#include "core.h" 49#include "core.h"
50#include "bearer.h" 50#include "bearer.h"
51#include "msg.h"
52 51
53/* IANA assigned UDP port */ 52/* IANA assigned UDP port */
54#define UDP_PORT_DEFAULT 6118 53#define UDP_PORT_DEFAULT 6118
@@ -221,10 +220,6 @@ static int tipc_udp_recv(struct sock *sk, struct sk_buff *skb)
221{ 220{
222 struct udp_bearer *ub; 221 struct udp_bearer *ub;
223 struct tipc_bearer *b; 222 struct tipc_bearer *b;
224 int usr = msg_user(buf_msg(skb));
225
226 if ((usr == LINK_PROTOCOL) || (usr == NAME_DISTRIBUTOR))
227 skb_linearize(skb);
228 223
229 ub = rcu_dereference_sk_user_data(sk); 224 ub = rcu_dereference_sk_user_data(sk);
230 if (!ub) { 225 if (!ub) {