diff options
author | Antonio Quartulli <antonio@open-mesh.com> | 2013-03-25 17:27:00 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-05-28 20:44:53 -0400 |
commit | 281581d3e79eaacfcdc0827e9bf990422252ba5c (patch) | |
tree | 79b3cf5733210d3caa489db6ad2741965ad613e9 /net/batman-adv | |
parent | d1dc30739c587fe65f4120c045258ab01c79db1b (diff) |
batman-adv: don't check the source address twice
The source address has already been checked in
batadv_check_management_packet() upon packet reception and
therefore it does not need to be checked again in
ogm_process()
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/bat_iv_ogm.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index da239c5424b8..6d62e2992dfa 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c | |||
@@ -988,7 +988,7 @@ static void batadv_iv_ogm_process(const struct ethhdr *ethhdr, | |||
988 | struct batadv_neigh_node *orig_neigh_router = NULL; | 988 | struct batadv_neigh_node *orig_neigh_router = NULL; |
989 | int has_directlink_flag; | 989 | int has_directlink_flag; |
990 | int is_my_addr = 0, is_my_orig = 0, is_my_oldorig = 0; | 990 | int is_my_addr = 0, is_my_orig = 0, is_my_oldorig = 0; |
991 | int is_broadcast = 0, is_bidirect; | 991 | int is_bidirect; |
992 | bool is_single_hop_neigh = false; | 992 | bool is_single_hop_neigh = false; |
993 | bool is_from_best_next_hop = false; | 993 | bool is_from_best_next_hop = false; |
994 | int is_duplicate, sameseq, simlar_ttl; | 994 | int is_duplicate, sameseq, simlar_ttl; |
@@ -1051,9 +1051,6 @@ static void batadv_iv_ogm_process(const struct ethhdr *ethhdr, | |||
1051 | if (batadv_compare_eth(batadv_ogm_packet->prev_sender, | 1051 | if (batadv_compare_eth(batadv_ogm_packet->prev_sender, |
1052 | hard_iface->net_dev->dev_addr)) | 1052 | hard_iface->net_dev->dev_addr)) |
1053 | is_my_oldorig = 1; | 1053 | is_my_oldorig = 1; |
1054 | |||
1055 | if (is_broadcast_ether_addr(ethhdr->h_source)) | ||
1056 | is_broadcast = 1; | ||
1057 | } | 1054 | } |
1058 | rcu_read_unlock(); | 1055 | rcu_read_unlock(); |
1059 | 1056 | ||
@@ -1071,13 +1068,6 @@ static void batadv_iv_ogm_process(const struct ethhdr *ethhdr, | |||
1071 | return; | 1068 | return; |
1072 | } | 1069 | } |
1073 | 1070 | ||
1074 | if (is_broadcast) { | ||
1075 | batadv_dbg(BATADV_DBG_BATMAN, bat_priv, | ||
1076 | "Drop packet: ignoring all packets with broadcast source addr (sender: %pM)\n", | ||
1077 | ethhdr->h_source); | ||
1078 | return; | ||
1079 | } | ||
1080 | |||
1081 | if (is_my_orig) { | 1071 | if (is_my_orig) { |
1082 | unsigned long *word; | 1072 | unsigned long *word; |
1083 | int offset; | 1073 | int offset; |