[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1308953247-25266-20-git-send-email-paul.gortmaker@windriver.com>
Date: Fri, 24 Jun 2011 18:07:26 -0400
From: Paul Gortmaker <paul.gortmaker@...driver.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, Allan.Stephens@...driver.com,
Allan Stephens <allan.stephens@...driver.com>,
Paul Gortmaker <paul.gortmaker@...driver.com>
Subject: [PATCH net-next 19/20] tipc: Don't create payload message using connection protocol routine
From: Allan Stephens <allan.stephens@...driver.com>
Modifies the logic that creates a connection termination payload
message so that it no longer (mis)uses a routine that creates a
connection protocol message. The revised code is now more easily
understood, and avoids setting several fields that are either not
present in payload messages or were being set more than once.
Signed-off-by: Allan Stephens <allan.stephens@...driver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@...driver.com>
---
net/tipc/port.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 1b20b96..ab0a8e9 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -539,14 +539,15 @@ void tipc_port_recv_proto_msg(struct sk_buff *buf)
if (!p_ptr || !p_ptr->connected ||
(port_peernode(p_ptr) != orignode) ||
(port_peerport(p_ptr) != origport)) {
- r_buf = port_build_proto_msg(origport,
- orignode,
- destport,
- tipc_own_addr,
- TIPC_HIGH_IMPORTANCE,
- TIPC_CONN_MSG,
- TIPC_ERR_NO_PORT,
- 0);
+ r_buf = tipc_buf_acquire(BASIC_H_SIZE);
+ if (r_buf) {
+ msg = buf_msg(r_buf);
+ tipc_msg_init(msg, TIPC_HIGH_IMPORTANCE, TIPC_CONN_MSG,
+ BASIC_H_SIZE, orignode);
+ msg_set_errcode(msg, TIPC_ERR_NO_PORT);
+ msg_set_origport(msg, destport);
+ msg_set_destport(msg, origport);
+ }
if (p_ptr)
tipc_port_unlock(p_ptr);
goto exit;
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists