summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-06-13 22:31:16 +0000
committerpfg <pfg@FreeBSD.org>2016-06-13 22:31:16 +0000
commit0f12e1993e6b783d07578b3c2f8d53e6fb212728 (patch)
tree0e3a96b53c7bb73ad126ef00f7ffca75a902580b
parent4e79f59f9ab80cfebd25179a290b4fc8573f052f (diff)
downloadFreeBSD-src-0f12e1993e6b783d07578b3c2f8d53e6fb212728.zip
FreeBSD-src-0f12e1993e6b783d07578b3c2f8d53e6fb212728.tar.gz
Remove the SIOCSIFALIFETIME_IN6 ioctl.
The SIOCSIFALIFETIME_IN6 provided by the kame project is unused, it can't really be used safely and has been completely removed from NetBSD and OpenBSD. Obtained from: NetBSD (kern/35897) PR: 210148 (exp-run) Reviewed by: ae, hrs Relnotes: yes Approved by: re (glebius) Differential Revision: https://reviews.freebsd.org/D5491
-rw-r--r--sys/netinet6/in6.c44
-rw-r--r--sys/netinet6/in6_var.h1
2 files changed, 0 insertions, 45 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index d571dbd..e972ac7 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -360,7 +360,6 @@ in6_control(struct socket *so, u_long cmd, caddr_t data,
case SIOCSPFXFLUSH_IN6:
case SIOCSRTRFLUSH_IN6:
case SIOCGIFALIFETIME_IN6:
- case SIOCSIFALIFETIME_IN6:
case SIOCGIFSTAT_IN6:
case SIOCGIFSTAT_ICMP6:
sa6 = &ifr->ifr_addr;
@@ -459,34 +458,6 @@ in6_control(struct socket *so, u_long cmd, caddr_t data,
goto out;
}
break;
-
- case SIOCSIFALIFETIME_IN6:
- {
- struct in6_addrlifetime *lt;
-
- if (td != NULL) {
- error = priv_check(td, PRIV_NETINET_ALIFETIME6);
- if (error)
- goto out;
- }
- if (ia == NULL) {
- error = EADDRNOTAVAIL;
- goto out;
- }
- /* sanity for overflow - beware unsigned */
- lt = &ifr->ifr_ifru.ifru_lifetime;
- if (lt->ia6t_vltime != ND6_INFINITE_LIFETIME &&
- lt->ia6t_vltime + time_uptime < time_uptime) {
- error = EINVAL;
- goto out;
- }
- if (lt->ia6t_pltime != ND6_INFINITE_LIFETIME &&
- lt->ia6t_pltime + time_uptime < time_uptime) {
- error = EINVAL;
- goto out;
- }
- break;
- }
}
switch (cmd) {
@@ -572,21 +543,6 @@ in6_control(struct socket *so, u_long cmd, caddr_t data,
}
break;
- case SIOCSIFALIFETIME_IN6:
- ia->ia6_lifetime = ifr->ifr_ifru.ifru_lifetime;
- /* for sanity */
- if (ia->ia6_lifetime.ia6t_vltime != ND6_INFINITE_LIFETIME) {
- ia->ia6_lifetime.ia6t_expire =
- time_uptime + ia->ia6_lifetime.ia6t_vltime;
- } else
- ia->ia6_lifetime.ia6t_expire = 0;
- if (ia->ia6_lifetime.ia6t_pltime != ND6_INFINITE_LIFETIME) {
- ia->ia6_lifetime.ia6t_preferred =
- time_uptime + ia->ia6_lifetime.ia6t_pltime;
- } else
- ia->ia6_lifetime.ia6t_preferred = 0;
- break;
-
case SIOCAIFADDR_IN6:
{
struct nd_prefixctl pr0;
diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h
index 007fd66..77e5920 100644
--- a/sys/netinet6/in6_var.h
+++ b/sys/netinet6/in6_var.h
@@ -453,7 +453,6 @@ struct in6_rrenumreq {
#define SIOCSRTRFLUSH_IN6 _IOWR('i', 80, struct in6_ifreq)
#define SIOCGIFALIFETIME_IN6 _IOWR('i', 81, struct in6_ifreq)
-#define SIOCSIFALIFETIME_IN6 _IOWR('i', 82, struct in6_ifreq)
#define SIOCGIFSTAT_IN6 _IOWR('i', 83, struct in6_ifreq)
#define SIOCGIFSTAT_ICMP6 _IOWR('i', 84, struct in6_ifreq)
OpenPOWER on IntegriCloud