batman-adv: pass the correct header size to interface_rx
Commit Message
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
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,
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
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,
@@ -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;
}