Add an ipv6 bogo ip by the name bogo_ip6

to slim down one of my PRs with a trivial addition which, I hope, will
not be controversial.
parent 697999c1
......@@ -35,6 +35,7 @@
struct suckaddr;
extern const size_t vsa_suckaddr_len;
extern const struct suckaddr *bogo_ip;
extern const struct suckaddr *bogo_ip6;
void VSA_Init(void);
int VSA_Sane(const struct suckaddr *);
......
......@@ -183,11 +183,15 @@ const size_t vsa_suckaddr_len = sizeof(struct suckaddr);
*/
static struct suckaddr bogo_ip_vsa;
const struct suckaddr *bogo_ip = &bogo_ip_vsa;
/* same in IPv6 */
static struct suckaddr bogo_ip6_vsa;
const struct suckaddr *bogo_ip6 = &bogo_ip6_vsa;
void
VSA_Init()
{
AN(VSA_BuildFAP(&bogo_ip_vsa, PF_INET, NULL, 0, NULL, 0));
AN(VSA_BuildFAP(&bogo_ip6_vsa, PF_INET6, NULL, 0, NULL, 0));
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment