batman-adv: pass the correct header size to interface_rx

Message ID 1328045710-32600-1-git-send-email-ordex@autistici.org (mailing list archive)
State Rejected, archived
Headers

Commit Message

Antonio Quartulli Jan. 31, 2012, 9:35 p.m. UTC
  in recv_unicast_frag(), the third parameter of the interface_rx() invocation,
which is the size of the current header, is wrongly computed.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
 routing.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
  

Comments

Antonio Quartulli Jan. 31, 2012, 9:39 p.m. UTC | #1
On Tue, Jan 31, 2012 at 10:35:10 +0100, Antonio Quartulli wrote:
> in recv_unicast_frag(), the third parameter of the interface_rx() invocation,
> which is the size of the current header, is wrongly computed.
> 
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
> ---


This patch is based on top of maint, even if it does not really change so much.

Cheers,
  
Sven Eckelmann Jan. 31, 2012, 10:53 p.m. UTC | #2
On Tuesday 31 January 2012 22:35:10 Antonio Quartulli wrote:
> in recv_unicast_frag(), the third parameter of the interface_rx()
> invocation, which is the size of the current header, is wrongly computed.

Really (actually it is the fourth, but I don't want to talk about that)? 
Wasn't the reassembled unicast packet just a unicast packet and not a 
unicast_frag packet (see frag_merge_packet)?

I could be wrong (didn't checked it), but I just have the feeling that the 
current version could be correct.

Kind regards,
	Sven
  
Antonio Quartulli Feb. 1, 2012, 7:15 a.m. UTC | #3
On Tue, Jan 31, 2012 at 11:53:33PM +0100, Sven Eckelmann wrote:
> On Tuesday 31 January 2012 22:35:10 Antonio Quartulli wrote:
> > in recv_unicast_frag(), the third parameter of the interface_rx()
> > invocation, which is the size of the current header, is wrongly computed.
> 
> Really (actually it is the fourth, but I don't want to talk about that)? 
> Wasn't the reassembled unicast packet just a unicast packet and not a 
> unicast_frag packet (see frag_merge_packet)?
> 
> I could be wrong (didn't checked it), but I just have the feeling that the 
> current version could be correct.

I double checked a few second ago and yes, you are right. Once the packet has
been merged again it is a unicast_packet.

So, please guys, drop this patch.


Regards,
  

Patch

diff --git a/routing.c b/routing.c
index f961cc5..cf8fe0a 100644
--- a/routing.c
+++ b/routing.c
@@ -990,7 +990,7 @@  int recv_ucast_frag_packet(struct sk_buff *skb, struct hard_iface *recv_if)
 			return NET_RX_SUCCESS;
 
 		interface_rx(recv_if->soft_iface, new_skb, recv_if,
-			     sizeof(struct unicast_packet));
+			     sizeof(*unicast_packet));
 		return NET_RX_SUCCESS;
 	}