diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2014-02-13 23:29:05 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-13 23:57:05 +0100 |
commit | 03b92017933bd22a3dca6830048877dd3162f872 (patch) | |
tree | b4632236d0c8dd6a325bc0787486fba3ab6bcb52 /net/tipc/link.h | |
parent | tipc: explicitly include core.h in addr.h (diff) | |
download | linux-03b92017933bd22a3dca6830048877dd3162f872.tar.xz linux-03b92017933bd22a3dca6830048877dd3162f872.zip |
tipc: stricter behavior of message reassembly function
The function tipc_link_recv_fragment(struct sk_buff **buf) currently
leaves the value of the input buffer pointer undefined when it returns,
except when the return code indicates that the reassembly is complete.
This despite the fact that it always consumes the input buffer.
Here, we enforce a stricter behavior by this function, ensuring that
the returned buffer pointer is non-NULL if and only if the reassembly
is complete. This makes it possible to test for the buffer pointer as
criteria for successful reassembly.
We also rename the function to tipc_link_frag_rcv(), which is both
shorter and more in line with common naming practice in the network
subsystem.
Apart from the new name, these changes have no impact on current
users of the function, but makes it more practical for use in some
planned future commits.
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.h')
-rw-r--r-- | net/tipc/link.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/tipc/link.h b/net/tipc/link.h index 3b6aa65b608c..8addc5ec5fc6 100644 --- a/net/tipc/link.h +++ b/net/tipc/link.h @@ -239,9 +239,9 @@ int tipc_link_send_sections_fast(struct tipc_port *sender, struct iovec const *msg_sect, unsigned int len, u32 destnode); void tipc_link_recv_bundle(struct sk_buff *buf); -int tipc_link_recv_fragment(struct sk_buff **reasm_head, - struct sk_buff **reasm_tail, - struct sk_buff **fbuf); +int tipc_link_frag_rcv(struct sk_buff **reasm_head, + struct sk_buff **reasm_tail, + struct sk_buff **fbuf); void tipc_link_send_proto_msg(struct tipc_link *l_ptr, u32 msg_typ, int prob, u32 gap, u32 tolerance, u32 priority, u32 acked_mtu); |