diff options
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r-- | net/tipc/link.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index b8c1231e3147..c62ebfea9304 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -1766,21 +1766,6 @@ void tipc_link_retransmit(struct link *l_ptr, struct sk_buff *buf, | |||
1766 | l_ptr->retransm_queue_head = l_ptr->retransm_queue_size = 0; | 1766 | l_ptr->retransm_queue_head = l_ptr->retransm_queue_size = 0; |
1767 | } | 1767 | } |
1768 | 1768 | ||
1769 | /* | ||
1770 | * link_recv_non_seq: Receive packets which are outside | ||
1771 | * the link sequence flow | ||
1772 | */ | ||
1773 | |||
1774 | static void link_recv_non_seq(struct sk_buff *buf) | ||
1775 | { | ||
1776 | struct tipc_msg *msg = buf_msg(buf); | ||
1777 | |||
1778 | if (msg_user(msg) == LINK_CONFIG) | ||
1779 | tipc_disc_recv_msg(buf); | ||
1780 | else | ||
1781 | tipc_bclink_recv_pkt(buf); | ||
1782 | } | ||
1783 | |||
1784 | /** | 1769 | /** |
1785 | * link_insert_deferred_queue - insert deferred messages back into receive chain | 1770 | * link_insert_deferred_queue - insert deferred messages back into receive chain |
1786 | */ | 1771 | */ |
@@ -1857,7 +1842,7 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr) | |||
1857 | { | 1842 | { |
1858 | read_lock_bh(&tipc_net_lock); | 1843 | read_lock_bh(&tipc_net_lock); |
1859 | while (head) { | 1844 | while (head) { |
1860 | struct bearer *b_ptr; | 1845 | struct bearer *b_ptr = (struct bearer *)tb_ptr; |
1861 | struct node *n_ptr; | 1846 | struct node *n_ptr; |
1862 | struct link *l_ptr; | 1847 | struct link *l_ptr; |
1863 | struct sk_buff *crs; | 1848 | struct sk_buff *crs; |
@@ -1868,9 +1853,6 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr) | |||
1868 | u32 released = 0; | 1853 | u32 released = 0; |
1869 | int type; | 1854 | int type; |
1870 | 1855 | ||
1871 | b_ptr = (struct bearer *)tb_ptr; | ||
1872 | TIPC_SKB_CB(buf)->handle = b_ptr; | ||
1873 | |||
1874 | head = head->next; | 1856 | head = head->next; |
1875 | 1857 | ||
1876 | /* Ensure message is well-formed */ | 1858 | /* Ensure message is well-formed */ |
@@ -1889,7 +1871,10 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr) | |||
1889 | msg = buf_msg(buf); | 1871 | msg = buf_msg(buf); |
1890 | 1872 | ||
1891 | if (unlikely(msg_non_seq(msg))) { | 1873 | if (unlikely(msg_non_seq(msg))) { |
1892 | link_recv_non_seq(buf); | 1874 | if (msg_user(msg) == LINK_CONFIG) |
1875 | tipc_disc_recv_msg(buf, b_ptr); | ||
1876 | else | ||
1877 | tipc_bclink_recv_pkt(buf); | ||
1893 | continue; | 1878 | continue; |
1894 | } | 1879 | } |
1895 | 1880 | ||
@@ -1996,8 +1981,6 @@ deliver: | |||
1996 | if (link_recv_changeover_msg(&l_ptr, &buf)) { | 1981 | if (link_recv_changeover_msg(&l_ptr, &buf)) { |
1997 | msg = buf_msg(buf); | 1982 | msg = buf_msg(buf); |
1998 | seq_no = msg_seqno(msg); | 1983 | seq_no = msg_seqno(msg); |
1999 | TIPC_SKB_CB(buf)->handle | ||
2000 | = b_ptr; | ||
2001 | if (type == ORIGINAL_MSG) | 1984 | if (type == ORIGINAL_MSG) |
2002 | goto deliver; | 1985 | goto deliver; |
2003 | goto protocol_check; | 1986 | goto protocol_check; |