summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2016-02-26 12:33:31 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2016-02-26 12:33:31 +0000
commitc816ffd46dd3c5140dc8af428f0fe03dd167d4fa (patch)
treef8a5df0d0a878f32139255ce9243a585834e2822 /usr.sbin
parentcf835ad6c35c150939ae527d77852cb03031b2e5 (diff)
Remove #if'0ed code that uses a deprecated ioctl; ok florian@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/rtadvd/config.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c
index 16bc1554dc4..c69e85a23ac 100644
--- a/usr.sbin/rtadvd/config.c
+++ b/usr.sbin/rtadvd/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.51 2016/02/26 12:31:48 jca Exp $ */
+/* $OpenBSD: config.c,v 1.52 2016/02/26 12:33:30 jca Exp $ */
/* $KAME: config.c,v 1.62 2002/05/29 10:13:10 itojun Exp $ */
/*
@@ -686,44 +686,11 @@ delete_prefix(struct rainfo *rai, struct prefix *prefix)
static int
init_prefix(struct in6_prefixreq *ipr)
{
-#if 0
- int s;
-
- if ((s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
- log_warn("socket");
- exit(1);
- }
-
- if (ioctl(s, SIOCGIFPREFIX_IN6, (caddr_t)ipr) < 0) {
- log_warn("ioctl:SIOCGIFFLAGS: failed for %s", ifr.ifr_name);
-
- ipr->ipr_vltime = DEF_ADVVALIDLIFETIME;
- ipr->ipr_pltime = DEF_ADVPREFERREDLIFETIME;
- ipr->ipr_raf_onlink = 1;
- ipr->ipr_raf_auto = 1;
- /* omit other field initialization */
- }
- else if (ipr->ipr_origin < PR_ORIG_RR) {
- u_char ntopbuf[INET6_ADDRSTRLEN];
-
- log_warn("Added prefix(%s)'s origin %d is"
- " lower than PR_ORIG_RR(router renumbering)."
- " This should not happen if I am router",
- inet_ntop(AF_INET6, &ipr->ipr_prefix.sin6_addr, ntopbuf,
- sizeof(ntopbuf)), ipr->ipr_origin);
- close(s);
- return 1;
- }
-
- close(s);
- return 0;
-#else
ipr->ipr_vltime = DEF_ADVVALIDLIFETIME;
ipr->ipr_pltime = DEF_ADVPREFERREDLIFETIME;
ipr->ipr_raf_onlink = 1;
ipr->ipr_raf_auto = 1;
return 0;
-#endif
}
void