summaryrefslogtreecommitdiffstats
path: root/net/l2tp
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2015-07-22 10:11:18 -0400
committerDavid S. Miller <davem@davemloft.net>2015-07-26 16:31:50 -0700
commit29042e19f2c602fabe4705b5b719550b4627639c (patch)
treec56867f0670a1c8d4d20735857dbae24123778f4 /net/l2tp
parenta69e5a0dcfa4ea3e92b3cc0f17a39f1d88045c11 (diff)
downloadlinux-29042e19f2c602fabe4705b5b719550b4627639c.tar.gz
linux-29042e19f2c602fabe4705b5b719550b4627639c.tar.bz2
linux-29042e19f2c602fabe4705b5b719550b4627639c.zip
tipc: let function tipc_msg_reverse() expand header when needed
The shortest TIPC message header, for cluster local CONNECTED messages, is 24 bytes long. With this format, the fields "dest_node" and "orig_node" are optimized away, since they in reality are redundant in this particular case. However, the absence of these fields leads to code inconsistencies that are difficult to handle in some cases, especially when we need to reverse or reject messages at the socket layer. In this commit, we concentrate the handling of the absent fields to one place, by letting the function tipc_msg_reverse() reallocate the buffer and expand the header to 32 bytes when necessary. This means that the socket code now can assume that the two previously absent fields are present in the header when a message needs to be rejected. This opens up for some further simplifications of the socket code. Reviewed-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp')
0 files changed, 0 insertions, 0 deletions