diff options
| author | Allan Stephens <allan.stephens@windriver.com> | 2011-11-02 10:32:14 -0400 |
|---|---|---|
| committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-02-06 16:59:19 -0500 |
| commit | dff10e9e637663c8c5dd0bae1a8f0e899cbb4a36 (patch) | |
| tree | 08b607dac7f39a5e405b81da527f8644ac5ca58d /net/tipc | |
| parent | 3175bd9add570f3b5c06877369897b334556a2ff (diff) | |
tipc: Minor optimization to rejection of connection-based messages
Modifies message rejection logic so that TIPC doesn't attempt to
send a FIN message to the rejecting port if it is known in advance
that there is no such message because the rejecting port doesn't exist.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc')
| -rw-r--r-- | net/tipc/port.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c index d91efc69e6f9..ba3268b8da42 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c | |||
| @@ -400,15 +400,16 @@ int tipc_reject_msg(struct sk_buff *buf, u32 err) | |||
| 400 | 400 | ||
| 401 | /* send self-abort message when rejecting on a connected port */ | 401 | /* send self-abort message when rejecting on a connected port */ |
| 402 | if (msg_connected(msg)) { | 402 | if (msg_connected(msg)) { |
| 403 | struct sk_buff *abuf = NULL; | ||
| 404 | struct tipc_port *p_ptr = tipc_port_lock(msg_destport(msg)); | 403 | struct tipc_port *p_ptr = tipc_port_lock(msg_destport(msg)); |
| 405 | 404 | ||
| 406 | if (p_ptr) { | 405 | if (p_ptr) { |
| 406 | struct sk_buff *abuf = NULL; | ||
| 407 | |||
| 407 | if (p_ptr->connected) | 408 | if (p_ptr->connected) |
| 408 | abuf = port_build_self_abort_msg(p_ptr, err); | 409 | abuf = port_build_self_abort_msg(p_ptr, err); |
| 409 | tipc_port_unlock(p_ptr); | 410 | tipc_port_unlock(p_ptr); |
| 411 | tipc_net_route_msg(abuf); | ||
| 410 | } | 412 | } |
| 411 | tipc_net_route_msg(abuf); | ||
| 412 | } | 413 | } |
| 413 | 414 | ||
| 414 | /* send returned message & dispose of rejected message */ | 415 | /* send returned message & dispose of rejected message */ |
