diff options
author | Gerlando Falauto <gerlando.falauto@keymile.com> | 2013-05-01 12:04:46 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-03 16:08:58 -0400 |
commit | 488fc9af8267d0cd9036bc9db9f5dbbfde6de208 (patch) | |
tree | aaf73f28130170949f726c91af8394d924770e7b /net/bridge/br.c | |
parent | 77861d9c00900c0105b9d66ecf9fa612a43f8df5 (diff) | |
download | kernel_goldelico_gta04-488fc9af8267d0cd9036bc9db9f5dbbfde6de208.zip kernel_goldelico_gta04-488fc9af8267d0cd9036bc9db9f5dbbfde6de208.tar.gz kernel_goldelico_gta04-488fc9af8267d0cd9036bc9db9f5dbbfde6de208.tar.bz2 |
tipc: pskb_copy() buffers when sending on more than one bearer
When sending packets, TIPC bearers use skb_clone() before writing their
hardware header. This will however NOT copy the data buffer.
So when the same packet is sent over multiple bearers (to reach multiple
nodes), the same socket buffer data will be treated by multiple
tipc_media drivers which will write their own hardware header through
dev_hard_header().
Most of the time this is not a problem, because by the time the
packet is processed by the second media, it has already been sent over
the first one. However, when the first transmission is delayed (e.g.
because of insufficient bandwidth or through a shaper), the next bearer
will overwrite the hardware header, resulting in the packet being sent:
a) with the wrong source address, when bearers of the same type,
e.g. ethernet, are involved
b) with a completely corrupt header, or even dropped, when bearers of
different types are involved.
So when the same socket buffer is to be sent multiple times, send a
pskb_copy() instead (from the second instance on), and release it
afterwards (the bearer will skb_clone() it anyway).
Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br.c')
0 files changed, 0 insertions, 0 deletions