Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102684
b: refs/heads/master
c: 1265a02
h: refs/heads/master
v: v3
  • Loading branch information
Allan Stephens authored and David S. Miller committed Jun 5, 2008
1 parent 54463f3 commit 471a7f0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a686e6859e976712e28f6af927cd52a6a3bb372a
refs/heads/master: 1265a02108c508b508112cdeac922aad03e0146a
4 changes: 2 additions & 2 deletions trunk/net/tipc/discover.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ static void disc_dupl_alert(struct bearer *b_ptr, u32 node_addr,
/**
* tipc_disc_recv_msg - handle incoming link setup message (request or response)
* @buf: buffer containing message
* @b_ptr: bearer that message arrived on
*/

void tipc_disc_recv_msg(struct sk_buff *buf)
void tipc_disc_recv_msg(struct sk_buff *buf, struct bearer *b_ptr)
{
struct bearer *b_ptr = (struct bearer *)TIPC_SKB_CB(buf)->handle;
struct link *link;
struct tipc_media_addr media_addr;
struct tipc_msg *msg = buf_msg(buf);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/tipc/discover.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct link_req *tipc_disc_init_link_req(struct bearer *b_ptr,
void tipc_disc_update_link_req(struct link_req *req);
void tipc_disc_stop_link_req(struct link_req *req);

void tipc_disc_recv_msg(struct sk_buff *buf);
void tipc_disc_recv_msg(struct sk_buff *buf, struct bearer *b_ptr);

void tipc_disc_link_event(u32 addr, char *name, int up);
#if 0
Expand Down
27 changes: 5 additions & 22 deletions trunk/net/tipc/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -1766,21 +1766,6 @@ void tipc_link_retransmit(struct link *l_ptr, struct sk_buff *buf,
l_ptr->retransm_queue_head = l_ptr->retransm_queue_size = 0;
}

/*
* link_recv_non_seq: Receive packets which are outside
* the link sequence flow
*/

static void link_recv_non_seq(struct sk_buff *buf)
{
struct tipc_msg *msg = buf_msg(buf);

if (msg_user(msg) == LINK_CONFIG)
tipc_disc_recv_msg(buf);
else
tipc_bclink_recv_pkt(buf);
}

/**
* link_insert_deferred_queue - insert deferred messages back into receive chain
*/
Expand Down Expand Up @@ -1857,7 +1842,7 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr)
{
read_lock_bh(&tipc_net_lock);
while (head) {
struct bearer *b_ptr;
struct bearer *b_ptr = (struct bearer *)tb_ptr;
struct node *n_ptr;
struct link *l_ptr;
struct sk_buff *crs;
Expand All @@ -1868,9 +1853,6 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr)
u32 released = 0;
int type;

b_ptr = (struct bearer *)tb_ptr;
TIPC_SKB_CB(buf)->handle = b_ptr;

head = head->next;

/* Ensure message is well-formed */
Expand All @@ -1889,7 +1871,10 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr)
msg = buf_msg(buf);

if (unlikely(msg_non_seq(msg))) {
link_recv_non_seq(buf);
if (msg_user(msg) == LINK_CONFIG)
tipc_disc_recv_msg(buf, b_ptr);
else
tipc_bclink_recv_pkt(buf);
continue;
}

Expand Down Expand Up @@ -1996,8 +1981,6 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr)
if (link_recv_changeover_msg(&l_ptr, &buf)) {
msg = buf_msg(buf);
seq_no = msg_seqno(msg);
TIPC_SKB_CB(buf)->handle
= b_ptr;
if (type == ORIGINAL_MSG)
goto deliver;
goto protocol_check;
Expand Down

0 comments on commit 471a7f0

Please sign in to comment.