when no source-address-selection policy is installed, not scan
the sysctl MIB, as it leads to an unnecessary sysctl error. Obtained from: KAME
This commit is contained in:
parent
9df81bbc89
commit
2df3425140
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123870
@ -1,4 +1,4 @@
|
|||||||
/* $KAME: ip6addrctl.c,v 1.1 2001/12/27 12:45:24 jinmei Exp $ */
|
/* $KAME: ip6addrctl.c,v 1.3 2003/12/16 08:14:28 suz Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2001 WIDE Project.
|
* Copyright (C) 2001 WIDE Project.
|
||||||
@ -118,6 +118,10 @@ get_policy()
|
|||||||
err(1, "sysctl(IPV6CTL_ADDRCTLPOLICY)");
|
err(1, "sysctl(IPV6CTL_ADDRCTLPOLICY)");
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
if (l == 0) {
|
||||||
|
printf("no source-address-selection policy is installed\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ((buf = malloc(l)) == NULL) {
|
if ((buf = malloc(l)) == NULL) {
|
||||||
errx(1, "malloc failed");
|
errx(1, "malloc failed");
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
|
Loading…
Reference in New Issue
Block a user