linux_dsm_epyc7002/net/batman-adv
Antonio Quartulli 0d16449195 batman-adv: avoid NULL dereferences and fix if check
Gateway having bandwidth_down equal to zero are not accepted
at all and so never added to the Gateway list.
For this reason checking the bandwidth_down member in
batadv_gw_out_of_range() is useless.

This is probably a copy/paste error and this check was supposed
to be "!gw_node" only. Moreover, the way the check is written
now may also lead to a NULL dereference.

Fix this by rewriting the if-condition properly.

Introduced by 414254e342
("batman-adv: tvlv - gateway download/upload bandwidth container")

Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-23 23:13:37 -05:00
..
bat_algo.h
bat_iv_ogm.c batman-adv: prefer kmalloc_array to kmalloc when possible 2014-08-04 16:02:10 +02:00
bitarray.c
bitarray.h
bridge_loop_avoidance.c batman-adv: drop QinQ claim frames in bridge loop avoidance 2014-07-21 09:05:31 +02:00
bridge_loop_avoidance.h
debugfs.c
debugfs.h
distributed-arp-table.c batman-adv: prefer kmalloc_array to kmalloc when possible 2014-08-04 16:02:10 +02:00
distributed-arp-table.h
fragmentation.c batman-adv: Unify fragment size calculation 2014-12-23 23:13:37 -05:00
fragmentation.h
gateway_client.c batman-adv: avoid NULL dereferences and fix if check 2014-12-23 23:13:37 -05:00
gateway_client.h
gateway_common.c batman-adv: replace strnicmp with strncasecmp 2014-10-14 02:18:24 +02:00
gateway_common.h
hard-interface.c
hard-interface.h
hash.c batman-adv: prefer kmalloc_array to kmalloc when possible 2014-08-04 16:02:10 +02:00
hash.h
icmp_socket.c
icmp_socket.h
Kconfig
main.c
main.h batman-adv: Start new development cycle 2014-08-05 09:42:17 +02:00
Makefile
multicast.c batman: fix duplicate #include of multicast.h 2014-08-07 16:02:57 -07:00
multicast.h
network-coding.c
network-coding.h
originator.c
originator.h
packet.h
routing.c batman-adv: remove unnecessary logspam 2014-08-05 09:41:54 +02:00
routing.h
send.c
send.h
soft-interface.c batman-adv: increase default hop penalty 2014-08-05 09:42:13 +02:00
soft-interface.h
sysfs.c batman-adv: Use kasprintf 2014-07-07 17:00:31 -07:00
sysfs.h
translation-table.c batman-adv: fix TT VLAN inconsistency on VLAN re-add 2014-07-21 09:49:30 +02:00
translation-table.h
types.h batman-adv: fix TT VLAN inconsistency on VLAN re-add 2014-07-21 09:49:30 +02:00