Project

General

Profile

Bug #153 » 0001-batman-adv-do_bcast-has-to-be-true-for-broadcast-pac.patch

Antonio Quartulli, 09/20/2011 10:17 AM

View differences:

soft-interface.c
566 566
	struct orig_node *orig_node = NULL;
567 567
	int data_len = skb->len, ret;
568 568
	short vid = -1;
569
	bool do_bcast = false;
569
	bool do_bcast;
570 570

  
571 571
	if (atomic_read(&bat_priv->mesh_state) != MESH_ACTIVE)
572 572
		goto dropped;
......
600 600

  
601 601
	orig_node = transtable_search(bat_priv, ethhdr->h_source,
602 602
				      ethhdr->h_dest);
603
	if (is_multicast_ether_addr(ethhdr->h_dest) ||
604
				(orig_node && orig_node->gw_flags)) {
603
	do_bcast = is_multicast_ether_addr(ethhdr->h_dest);
604
	if (do_bcast ||	(orig_node && orig_node->gw_flags)) {
605 605
		ret = gw_is_target(bat_priv, skb, orig_node);
606 606

  
607 607
		if (ret < 0)
608 608
			goto dropped;
609 609

  
610
		if (ret == 0)
611
			do_bcast = true;
610
		if (ret)
611
			do_bcast = false;
612 612
	}
613 613

  
614 614
	/* ethernet packet should be broadcasted */
615
- 
(3-3/3)