net/utils: Introduce inet_addr_is_any

Can be useful to check INET_ANY address for both ipv4/ipv6 addresses.

Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Sagi Grimberg
2018-01-24 20:24:24 +02:00
committed by Jens Axboe
parent 57678e5a3d
commit a470143fc8
2 changed files with 24 additions and 0 deletions

View File

@@ -59,5 +59,6 @@ extern int in6_pton(const char *src, int srclen, u8 *dst, int delim, const char
extern int inet_pton_with_scope(struct net *net, unsigned short af,
const char *src, const char *port, struct sockaddr_storage *addr);
extern bool inet_addr_is_any(struct sockaddr *addr);
#endif /* _LINUX_INET_H */