]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: make bearer packet filtering generic
authorJon Paul Maloy <jon.maloy@ericsson.com>
Tue, 16 Aug 2016 15:53:50 +0000 (11:53 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Aug 2016 04:14:36 +0000 (21:14 -0700)
commit00d08868918c5f0a729681fd44d63959712fb011
tree360722c2eae3e17cb4801e1dc8f14aeb91437284
parent892a25cf4dfe4a04f3c06cc85c3f27ac038a1e6b
tipc: make bearer packet filtering generic

In commit 1bf17994c502 ("tipc: stricter filtering of packets in bearer
layer") we introduced a method of filtering out messages while a bearer
is being reset, to avoid that links may be re-created and come back in
working state while we are still in the process of shutting them down.

This solution works well, but is limited to only work with L2 media, which
is insufficient with the increasing use of UDP as carrier media.

We now replace this solution with a more generic one, by introducing a
new flag "up" in the generic struct tipc_bearer. This field will be set
and reset at the same locations as with the previous solution, while
the packet filtering is moved to the generic code for the sending side.
On the receiving side, the filtering is still done in media specific
code, but now including the UDP bearer.

Acked-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>
net/tipc/bearer.c
net/tipc/bearer.h
net/tipc/udp_media.c