summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/tipc/core.h1
-rw-r--r--net/tipc/link.c2
-rw-r--r--net/tipc/msg.c5
-rw-r--r--net/tipc/msg.h5
4 files changed, 5 insertions, 8 deletions
diff --git a/net/tipc/core.h b/net/tipc/core.h
index b578b10feefa..84602137ce20 100644
--- a/net/tipc/core.h
+++ b/net/tipc/core.h
@@ -192,6 +192,7 @@ struct tipc_skb_cb {
struct sk_buff *tail;
bool deferred;
bool wakeup_pending;
+ bool bundling;
u16 chain_sz;
u16 chain_imp;
};
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 470f05383d43..8eb885eb1433 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -875,7 +875,7 @@ void tipc_link_push_packets(struct tipc_link *l_ptr)
msg_set_ack(msg, mod(l_ptr->next_in_no - 1));
msg_set_bcast_ack(msg, l_ptr->owner->bclink.last_in);
if (msg_user(msg) == MSG_BUNDLER)
- msg_set_type(msg, BUNDLE_CLOSED);
+ TIPC_SKB_CB(skb)->bundling = false;
tipc_bearer_send(l_ptr->bearer_id, skb,
&l_ptr->media_addr);
l_ptr->next_out = skb->next;
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index 9155496b8a8a..94db39217248 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -289,7 +289,7 @@ bool tipc_msg_bundle(struct sk_buff *bbuf, struct sk_buff *buf, u32 mtu)
return false;
if (likely(msg_user(bmsg) != MSG_BUNDLER))
return false;
- if (likely(msg_type(bmsg) != BUNDLE_OPEN))
+ if (likely(!TIPC_SKB_CB(bbuf)->bundling))
return false;
if (unlikely(skb_tailroom(bbuf) < (pad + msz)))
return false;
@@ -336,11 +336,12 @@ bool tipc_msg_make_bundle(struct sk_buff **buf, u32 mtu, u32 dnode)
skb_trim(bbuf, INT_H_SIZE);
bmsg = buf_msg(bbuf);
- tipc_msg_init(bmsg, MSG_BUNDLER, BUNDLE_OPEN, INT_H_SIZE, dnode);
+ tipc_msg_init(bmsg, MSG_BUNDLER, 0, INT_H_SIZE, dnode);
msg_set_seqno(bmsg, msg_seqno(msg));
msg_set_ack(bmsg, msg_ack(msg));
msg_set_bcast_ack(bmsg, msg_bcast_ack(msg));
bbuf->next = (*buf)->next;
+ TIPC_SKB_CB(bbuf)->bundling = true;
tipc_msg_bundle(bbuf, *buf, mtu);
*buf = bbuf;
return true;
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index d7d2ba2afe6c..8ca874d6b4dc 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -464,11 +464,6 @@ static inline struct tipc_msg *msg_get_wrapped(struct tipc_msg *m)
#define FRAGMENT 1
#define LAST_FRAGMENT 2
-/* Bundling protocol message types
- */
-#define BUNDLE_OPEN 0
-#define BUNDLE_CLOSED 1
-
/*
* Link management protocol message types
*/