summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ip6addrctl
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2003-12-26 17:04:44 +0000
committerume <ume@FreeBSD.org>2003-12-26 17:04:44 +0000
commitf137b184df57220ba214e55488c4634045fd5aab (patch)
tree2fb6094118ab9caf2ea8e6cdb267bb39a51a7d09 /usr.sbin/ip6addrctl
parent0d1672387872f78dcee036b206649dd31509222f (diff)
downloadFreeBSD-src-f137b184df57220ba214e55488c4634045fd5aab.zip
FreeBSD-src-f137b184df57220ba214e55488c4634045fd5aab.tar.gz
when no source-address-selection policy is installed, not scan
the sysctl MIB, as it leads to an unnecessary sysctl error. Obtained from: KAME
Diffstat (limited to 'usr.sbin/ip6addrctl')
-rw-r--r--usr.sbin/ip6addrctl/ip6addrctl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/ip6addrctl/ip6addrctl.c b/usr.sbin/ip6addrctl/ip6addrctl.c
index dd89070..12802b4 100644
--- a/usr.sbin/ip6addrctl/ip6addrctl.c
+++ b/usr.sbin/ip6addrctl/ip6addrctl.c
@@ -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.
@@ -118,6 +118,10 @@ get_policy()
err(1, "sysctl(IPV6CTL_ADDRCTLPOLICY)");
/* NOTREACHED */
}
+ if (l == 0) {
+ printf("no source-address-selection policy is installed\n");
+ return;
+ }
if ((buf = malloc(l)) == NULL) {
errx(1, "malloc failed");
/* NOTREACHED */
OpenPOWER on IntegriCloud