On Wed, Sep 04, 2013 at 06:27:39PM +0200, Simon Wunderlich wrote:
@@ -574,6 +562,13 @@ batadv_iv_ogm_can_aggregate(const struct batadv_ogm_packet *new_bat_ogm_packet, if (!primary_if) goto out;
/* packet is not leaving on the same interface.
* TODO: some other parts here could be reworked as the
* outgoing interface is specified now.
*/
What does this TODO exactly mean? What could be reworked?
if (forw_packet->if_outgoing != if_outgoing)
goto out;
- /* packets without direct link flag and high TTL
*/
- are flooded through the net
@@ -620,6 +615,7 @@ static void batadv_iv_ogm_aggregate_new(const unsigned char *packet_buff, int packet_len, unsigned long send_time, bool direct_link, struct batadv_hard_iface *if_incoming,
struct batadv_hard_iface *if_outgoing, int own_packet)
ehm, kerneldoc?
[...]
@@ -1449,6 +1489,10 @@ batadv_iv_ogm_process_per_outif(const struct ethhdr *ethhdr, if_outgoing, tt_buff, dup_status); rcu_read_unlock();
- /* don't forward packet if no outgoing interface was specified */
- if (!if_outgoing)
goto out_neigh;
can this really happen? or does it mean we have a BUG?
- /* is single hop (direct) neighbor */ if (is_single_hop_neigh) { if ((batadv_ogm_packet->header.ttl <= 2) &&
[...]
@@ -539,9 +542,12 @@ void batadv_send_outstanding_bat_ogm_packet(struct work_struct *work)
/* we have to have at least one packet in the queue * to determine the queues wake up time unless we are
* shutting down
* shutting down.
*
*/* only re-schedule if this is the "original" copy.
- if (forw_packet->own)
- if (forw_packet->own &&
batadv_schedule_bat_ogm(forw_packet->if_incoming);forw_packet->if_incoming == forw_packet->if_outgoing)
What do you mean with "original" copy? Can an "own" packet have if_incoming != if_outgoing?
Cheers,