b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH maint] batman-adv: clear control block of received socket buffers
@ 2014-09-17  6:56 Martin Hundebøll
  2014-09-17  7:17 ` Antonio Quartulli
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Hundebøll @ 2014-09-17  6:56 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Martin Hundebøll

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.

Introduced-by: 3c12de9a5c756b23fe7c9ab332474ece1568914c ("batman-adv: network coding - code and transmit packets if possible")
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.
 	 */
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH maint] batman-adv: clear control block of received socket buffers
  2014-09-17  6:56 [B.A.T.M.A.N.] [PATCH maint] batman-adv: clear control block of received socket buffers Martin Hundebøll
@ 2014-09-17  7:17 ` Antonio Quartulli
  2014-11-09  4:57   ` Marek Lindner
  0 siblings, 1 reply; 3+ messages in thread
From: Antonio Quartulli @ 2014-09-17  7:17 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking
  Cc: Martin Hundebøll

[-- Attachment #1: Type: text/plain, Size: 751 bytes --]



On 17/09/14 08:56, 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.
> 
> Introduced-by: 3c12de9a5c756b23fe7c9ab332474ece1568914c ("batman-adv: network coding - code and transmit packets if possible")

maybe the maintainer can split this line before pushing the patch, but
next time split this it in two of them :-) (like other patches we have)


Cheers,

-- 
Antonio Quartulli


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH maint] batman-adv: clear control block of received socket buffers
  2014-09-17  7:17 ` Antonio Quartulli
@ 2014-11-09  4:57   ` Marek Lindner
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Lindner @ 2014-11-09  4:57 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Martin Hundebøll, Antonio Quartulli

[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]

On Wednesday 17 September 2014 09:17:32 Antonio Quartulli wrote:
> On 17/09/14 08:56, 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.
> >
> > 
> >
> > Introduced-by: 3c12de9a5c756b23fe7c9ab332474ece1568914c ("batman-adv:
> > network coding - code and transmit packets if possible")
> maybe the maintainer can split this line before pushing the patch, but
> next time split this it in two of them  (like other patches we have)

Your bastard maintainer from hell also overlooks the missing 'v2' in the PATCH 
subject. He had to dig through the mailing list to find the latest & greatest 
version this patch has to offer.

Applied in revision 9ed2fc7.

Thanks,
Marek


PS: You did ask for more marecasms, didn't you ? :)

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-09  4:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-17  6:56 [B.A.T.M.A.N.] [PATCH maint] batman-adv: clear control block of received socket buffers Martin Hundebøll
2014-09-17  7:17 ` Antonio Quartulli
2014-11-09  4:57   ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).