Since other network components (and some drivers) uses the control block provided in skb's, the network coding feature might wrongly assume that an SKB has been decoded, and thus not try to code it with another packet again. This happens for instance when batman-adv is running on a bridge device.
Fix this by clearing the control block for every received SKB.
Signed-off-by: Martin Hundebøll martin@hundeboll.net --- main.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/main.c b/main.c index 2cdd25a..61e3ffd 100644 --- a/main.c +++ b/main.c @@ -403,6 +403,9 @@ int batadv_batman_skb_recv(struct sk_buff *skb, struct net_device *dev, goto err_free; }
+ /* reset control block to avoid left overs from previous users */ + memset(skb->cb, 0, sizeof(struct batadv_skb_cb)); + /* all receive handlers return whether they received or reused * the supplied skb. if not, we have to free the skb. */
Hi Martin,
On 16/09/14 13:19, Martin Hundebøll wrote:
Since other network components (and some drivers) uses the control block provided in skb's, the network coding feature might wrongly assume that an SKB has been decoded, and thus not try to code it with another packet again. This happens for instance when batman-adv is running on a bridge device.
Fix this by clearing the control block for every received SKB.
Signed-off-by: Martin Hundebøll martin@hundeboll.net
thanks for this patch. I guess this patch has to go into maint, but do you have any commit ID we could specify as Introduced-by ? (if you are about to send v2 with this info, please write "maint" right after PATCH)
Thanks!
b.a.t.m.a.n@lists.open-mesh.org