linux/net/tipc
Jon Paul Maloy e53567948f tipc: conditionally expand buffer headroom over udp tunnel
In commit d999297c3d ("tipc: reduce locking scope during packet reception")
we altered the packet retransmission function. Since then, when
restransmitting packets, we create a clone of the original buffer
using __pskb_copy(skb, MIN_H_SIZE), where MIN_H_SIZE is the size of
the area we want to have copied, but also the smallest possible TIPC
packet size. The value of MIN_H_SIZE is 24.

Unfortunately, __pskb_copy() also has the effect that the headroom
of the cloned buffer takes the size MIN_H_SIZE. This is too small
for carrying the packet over the UDP tunnel bearer, which requires
a minimum headroom of 28 bytes. A change to just use pskb_copy()
lets the clone inherit the original headroom of 80 bytes, but also
assumes that the copied data area is of at least that size, something
that is not always the case. So that is not a viable solution.

We now fix this by adding a check for sufficient headroom in the
transmit function of udp_media.c, and expanding it when necessary.

Fixes: commit d999297c3d ("tipc: reduce locking scope during packet reception")
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-21 19:13:48 -07:00
..
Kconfig tipc: add ip/udp media type 2015-03-05 22:08:42 -05:00
Makefile tipc: add ip/udp media type 2015-03-05 22:08:42 -05:00
addr.c tipc: simplify include dependencies 2015-05-14 12:24:45 -04:00
addr.h tipc: simplify include dependencies 2015-05-14 12:24:45 -04:00
bcast.c tipc: extend broadcast link window size 2015-10-21 19:02:17 -07:00
bcast.h tipc: reduce locking scope during packet reception 2015-07-20 20:41:16 -07:00
bearer.c tipc: move all link_reset() calls to link aggregation level 2015-07-30 17:25:13 -07:00
bearer.h tipc: make media xmit call outside node spinlock context 2015-07-20 20:41:15 -07:00
core.c tipc: rename functions defined in subscr.c 2015-05-04 15:04:00 -04:00
core.h tipc: clean up link creation 2015-07-30 17:25:15 -07:00
discover.c tipc: move received discovery data evaluation inside node.c 2015-07-30 17:25:14 -07:00
discover.h tipc: involve namespace infrastructure 2015-01-12 16:24:32 -05:00
eth_media.c tipc: make media address offset a common define 2015-02-27 18:18:48 -05:00
ib_media.c tipc: rename media/msg related definitions 2015-02-27 18:18:48 -05:00
link.c tipc: fix stale link problem during synchronization 2015-08-23 16:14:45 -07:00
link.h tipc: clean up link creation 2015-07-30 17:25:15 -07:00
msg.c tipc: allow non-linear first fragment buffer 2015-10-21 19:08:24 -07:00
msg.h tipc: move fragment importance field to new header position 2015-10-14 19:10:08 -07:00
name_distr.c tipc: make media xmit call outside node spinlock context 2015-07-20 20:41:15 -07:00
name_distr.h tipc: resolve race problem at unicast message reception 2015-02-05 16:00:02 -08:00
name_table.c tipc: rename functions defined in subscr.c 2015-05-04 15:04:00 -04:00
name_table.h tipc: convert legacy nl name table dump to nl compat 2015-02-09 13:20:48 -08:00
net.c tipc: simplify include dependencies 2015-05-14 12:24:45 -04:00
net.h tipc: make tipc node table aware of net namespace 2015-01-12 16:24:32 -05:00
netlink.c tipc: move and rename the legacy nl api to "nl compat" 2015-02-09 13:20:47 -08:00
netlink.h tipc: move and rename the legacy nl api to "nl compat" 2015-02-09 13:20:47 -08:00
netlink_compat.c tipc: don't sanity check non-existing TLV (NL compat) 2015-08-17 10:39:54 -07:00
node.c tipc: eliminate risk of stalled link synchronization 2015-10-14 06:06:40 -07:00
node.h tipc: remove implicit message delivery in node_unlock() 2015-07-30 17:25:14 -07:00
server.c tipc: use sock_create_kern interface to create kernel socket 2015-05-14 13:39:33 -04:00
server.h tipc: make subscriber server support net namespace 2015-01-12 16:24:33 -05:00
socket.c tipc: clean up socket layer message reception 2015-07-26 16:31:50 -07:00
socket.h tipc: clean up socket layer message reception 2015-07-26 16:31:50 -07:00
subscr.c tipc: adjust locking policy of subscription 2015-05-04 15:04:01 -04:00
subscr.h tipc: rename functions defined in subscr.c 2015-05-04 15:04:00 -04:00
sysctl.c tipc: add name distributor resiliency queue 2014-09-01 17:51:48 -07:00
udp_media.c tipc: conditionally expand buffer headroom over udp tunnel 2015-10-21 19:13:48 -07:00