core-lightning/gossipd/netaddress.h
Rusty Russell d40d22b68e gossipd: don't try to connect to non-routable addresses.
Someone could try to announce an internal address, and we might probe
it.

This breaks tests, so we add '--dev-allow-localhost' for our tests, so
we don't eliminate that one.  Of course, now we need to skip some more
tests in non-developer mode.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-05-07 22:37:28 +02:00

15 lines
457 B
C

#ifndef LIGHTNING_GOSSIPD_NETADDRESS_H
#define LIGHTNING_GOSSIPD_NETADDRESS_H
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <common/wireaddr.h>
/* Address is a wildcard: try to guess what it looks like to outside world */
bool guess_address(struct wireaddr *wireaddr);
/* Is this address public? */
bool address_routable(const struct wireaddr *wireaddr,
bool allow_localhost);
#endif /* LIGHTNING_GOSSIPD_NETADDRESS_H */