mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
ip6: fix parentheses in ip6_addr_has_scope
Both of the multicast checks should be skipped if the address type is unicast. This bug accidentally caused only one of them to be skipped, resulting in some unnecessary performance overhead. Reported by Axel Lin.
This commit is contained in:
parent
f60a2e8f85
commit
2903b476c7
@ -157,9 +157,9 @@
|
|||||||
* @return 1 if the address has a constrained scope, 0 if it does not.
|
* @return 1 if the address has a constrained scope, 0 if it does not.
|
||||||
*/
|
*/
|
||||||
#define ip6_addr_has_scope(ip6addr, type) \
|
#define ip6_addr_has_scope(ip6addr, type) \
|
||||||
(ip6_addr_islinklocal(ip6addr) || ((((type) != IP6_UNICAST) && \
|
(ip6_addr_islinklocal(ip6addr) || (((type) != IP6_UNICAST) && \
|
||||||
ip6_addr_ismulticast_iflocal(ip6addr)) || \
|
(ip6_addr_ismulticast_iflocal(ip6addr) || \
|
||||||
ip6_addr_ismulticast_linklocal(ip6addr)))
|
ip6_addr_ismulticast_linklocal(ip6addr))))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assign a zone index to an IPv6 address, based on a network interface. If the
|
* Assign a zone index to an IPv6 address, based on a network interface. If the
|
||||||
|
Loading…
Reference in New Issue
Block a user