batman-adv: add BAT_UNICAST_4ADDR handler in the packet-handlers array

Message ID 1331830115-16407-1-git-send-email-ordex@autistici.org (mailing list archive)
State Accepted, archived
Commit 7de96f50dd783093627501feec26f05f158588c9
Headers

Commit Message

Antonio Quartulli March 15, 2012, 4:48 p.m. UTC
  Commit 1887248c268928ebb434edab611978f51e2a4b8f introduced the packet-handlers
array but it forgot to set a proper handler for the BAT_UNICAST_4ADDR packet
type. This patch fixes it.

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

Comments

Antonio Quartulli March 15, 2012, 5:21 p.m. UTC | #1
On Thu, Mar 15, 2012 at 05:48:35PM +0100, Antonio Quartulli wrote:
> Commit 1887248c268928ebb434edab611978f51e2a4b8f introduced the packet-handlers
> array but it forgot to set a proper handler for the BAT_UNICAST_4ADDR packet
> type. This patch fixes it.
> 
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>

Sorry, but I forgot to say that this bug has been:

Reported-By: Martin Hundebøll <martin@hundeboll.net>

> ---
>  main.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/main.c b/main.c
> index 75938fb..0757c2d 100644
> --- a/main.c
> +++ b/main.c
> @@ -265,6 +265,8 @@ static void recv_handler_init(void)
>  
>  	/* batman icmp packet */
>  	recv_packet_handler[BAT_ICMP] = recv_icmp_packet;
> +	/* unicast with 4 addresses packet */
> +	recv_packet_handler[BAT_UNICAST_4ADDR] = recv_unicast_packet;
>  	/* unicast packet */
>  	recv_packet_handler[BAT_UNICAST] = recv_unicast_packet;
>  	/* fragmented unicast packet */
> -- 
> 1.7.3.4
>
  
Marek Lindner March 20, 2012, 12:53 p.m. UTC | #2
On Thursday, March 15, 2012 18:21:58 Antonio Quartulli wrote:
> On Thu, Mar 15, 2012 at 05:48:35PM +0100, Antonio Quartulli wrote:
> > Commit 1887248c268928ebb434edab611978f51e2a4b8f introduced the
> > packet-handlers array but it forgot to set a proper handler for the
> > BAT_UNICAST_4ADDR packet type. This patch fixes it.
> >
> > 
> >
> > Signed-off-by: Antonio Quartulli <ordex@autistici.org>
> 
> Sorry, but I forgot to say that this bug has been:
> 
> Reported-By: Martin Hundebøll <martin@hundeboll.net>

Applied in revision 7de96f5.

Thanks,
Marek
  

Patch

diff --git a/main.c b/main.c
index 75938fb..0757c2d 100644
--- a/main.c
+++ b/main.c
@@ -265,6 +265,8 @@  static void recv_handler_init(void)
 
 	/* batman icmp packet */
 	recv_packet_handler[BAT_ICMP] = recv_icmp_packet;
+	/* unicast with 4 addresses packet */
+	recv_packet_handler[BAT_UNICAST_4ADDR] = recv_unicast_packet;
 	/* unicast packet */
 	recv_packet_handler[BAT_UNICAST] = recv_unicast_packet;
 	/* fragmented unicast packet */