|
@@ -410,6 +410,11 @@ char *tipc_link_name(struct tipc_link *l)
|
|
|
return l->name;
|
|
|
}
|
|
|
|
|
|
+u32 tipc_link_state(struct tipc_link *l)
|
|
|
+{
|
|
|
+ return l->state;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* tipc_link_create - create a new link
|
|
|
* @n: pointer to associated node
|
|
@@ -1385,6 +1390,36 @@ static void tipc_link_build_proto_msg(struct tipc_link *l, int mtyp, bool probe,
|
|
|
__skb_queue_tail(xmitq, skb);
|
|
|
}
|
|
|
|
|
|
+void tipc_link_create_dummy_tnl_msg(struct tipc_link *l,
|
|
|
+ struct sk_buff_head *xmitq)
|
|
|
+{
|
|
|
+ u32 onode = tipc_own_addr(l->net);
|
|
|
+ struct tipc_msg *hdr, *ihdr;
|
|
|
+ struct sk_buff_head tnlq;
|
|
|
+ struct sk_buff *skb;
|
|
|
+ u32 dnode = l->addr;
|
|
|
+
|
|
|
+ skb_queue_head_init(&tnlq);
|
|
|
+ skb = tipc_msg_create(TUNNEL_PROTOCOL, FAILOVER_MSG,
|
|
|
+ INT_H_SIZE, BASIC_H_SIZE,
|
|
|
+ dnode, onode, 0, 0, 0);
|
|
|
+ if (!skb) {
|
|
|
+ pr_warn("%sunable to create tunnel packet\n", link_co_err);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ hdr = buf_msg(skb);
|
|
|
+ msg_set_msgcnt(hdr, 1);
|
|
|
+ msg_set_bearer_id(hdr, l->peer_bearer_id);
|
|
|
+
|
|
|
+ ihdr = (struct tipc_msg *)msg_data(hdr);
|
|
|
+ tipc_msg_init(onode, ihdr, TIPC_LOW_IMPORTANCE, TIPC_DIRECT_MSG,
|
|
|
+ BASIC_H_SIZE, dnode);
|
|
|
+ msg_set_errcode(ihdr, TIPC_ERR_NO_PORT);
|
|
|
+ __skb_queue_tail(&tnlq, skb);
|
|
|
+ tipc_link_xmit(l, &tnlq, xmitq);
|
|
|
+}
|
|
|
+
|
|
|
/* tipc_link_tnl_prepare(): prepare and return a list of tunnel packets
|
|
|
* with contents of the link's transmit and backlog queues.
|
|
|
*/
|