diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2017-07-12 16:53:59 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2017-07-12 16:53:59 +0000 |
commit | e2a453398d2204cc4d37f28595e6d8197565a3dc (patch) | |
tree | 59384a8a30a48c6360a209de736d4138a60312de /sys | |
parent | 7cf30b215fb866dec87461958bd5896dfadfc746 (diff) |
Get rid of ICMPV6CTL_ND6_DRLIST and ICMPV6CTL_ND6_PRLIST sysctls
With this we can also get rid of in6_prefix and in6_defrouter. They
are meaningless, the kernel no longer tracks this information.
Pointed out by & OK mpi
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/icmp6.h | 10 | ||||
-rw-r--r-- | sys/netinet6/icmp6.c | 5 | ||||
-rw-r--r-- | sys/netinet6/nd6.c | 48 | ||||
-rw-r--r-- | sys/netinet6/nd6.h | 30 |
4 files changed, 5 insertions, 88 deletions
diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index bfa5a196c70..19de45ababf 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: icmp6.h,v 1.44 2017/04/14 20:46:31 bluhm Exp $ */ +/* $OpenBSD: icmp6.h,v 1.45 2017/07/12 16:53:58 florian Exp $ */ /* $KAME: icmp6.h,v 1.84 2003/04/23 10:26:51 itojun Exp $ */ /* @@ -513,9 +513,7 @@ struct icmp6stat { #define ICMPV6CTL_MTUDISC_HIWAT 16 #define ICMPV6CTL_MTUDISC_LOWAT 17 #define ICMPV6CTL_ND6_DEBUG 18 -#define ICMPV6CTL_ND6_DRLIST 19 -#define ICMPV6CTL_ND6_PRLIST 20 -#define ICMPV6CTL_MAXID 21 +#define ICMPV6CTL_MAXID 19 #define ICMPV6CTL_NAMES { \ { 0, 0 }, \ @@ -537,8 +535,6 @@ struct icmp6stat { { "mtudisc_hiwat", CTLTYPE_INT }, \ { "mtudisc_lowat", CTLTYPE_INT }, \ { "nd6_debug", CTLTYPE_INT }, \ - { 0, 0 }, \ - { 0, 0 }, \ } #define ICMPV6CTL_VARS { \ @@ -561,8 +557,6 @@ struct icmp6stat { &icmp6_mtudisc_hiwat, \ &icmp6_mtudisc_lowat, \ &nd6_debug, \ - NULL, \ - NULL, \ } #define RTF_PROBEMTU RTF_PROTO1 diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 61facf80bcf..f998bfa0c18 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: icmp6.c,v 1.212 2017/06/26 14:12:35 bluhm Exp $ */ +/* $OpenBSD: icmp6.c,v 1.213 2017/07/12 16:53:58 florian Exp $ */ /* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */ /* @@ -1904,9 +1904,6 @@ icmp6_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, case ICMPV6CTL_STATS: return icmp6_sysctl_icmp6stat(oldp, oldlenp, newp); - case ICMPV6CTL_ND6_DRLIST: - case ICMPV6CTL_ND6_PRLIST: - return nd6_sysctl(name[0], oldp, oldlenp, newp, newlen); default: if (name[0] < ICMPV6CTL_MAXID) return (sysctl_int_arr(icmpv6ctl_vars, name, namelen, diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 1a0cffea012..890da4afe1f 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6.c,v 1.210 2017/07/11 12:51:05 florian Exp $ */ +/* $OpenBSD: nd6.c,v 1.211 2017/07/12 16:53:58 florian Exp $ */ /* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */ /* @@ -1430,49 +1430,3 @@ nd6_need_cache(struct ifnet *ifp) return (0); } } - -/* - * oldp - syscall arg, need copyout - * newp - syscall arg, need copyin - */ -/* XXXDEL? */ -int -nd6_sysctl(int name, void *oldp, size_t *oldlenp, void *newp, size_t newlen) -{ - void *p; - size_t ol; - int error; - - NET_ASSERT_LOCKED(); - - error = 0; - - if (newp) - return EPERM; - if (oldp && !oldlenp) - return EINVAL; - ol = oldlenp ? *oldlenp : 0; - - if (oldp) { - p = malloc(ol, M_TEMP, M_WAITOK | M_CANFAIL); - if (!p) - return ENOMEM; - } else - p = NULL; - switch (name) { - case ICMPV6CTL_ND6_DRLIST: - error = ENOTSUP; /* XXXDEL? can we delete more? */ - break; - - case ICMPV6CTL_ND6_PRLIST: - error = ENOTSUP; /* XXXDEL? can we delete more? */ - break; - - default: - error = ENOPROTOOPT; - break; - } - free(p, M_TEMP, ol); - - return (error); -} diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index 660c681e333..3b08e2c5dfe 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6.h,v 1.67 2017/07/11 12:51:05 florian Exp $ */ +/* $OpenBSD: nd6.h,v 1.68 2017/07/12 16:53:58 florian Exp $ */ /* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */ /* @@ -68,14 +68,6 @@ struct in6_nbrinfo { int state; /* reachability state */ }; -struct in6_defrouter { - struct sockaddr_in6 rtaddr; - time_t expire; - u_short rtlifetime; - u_short if_index; - u_char flags; -}; - struct prf_ra { u_int onlink : 1; u_int autonomous : 1; @@ -83,25 +75,6 @@ struct prf_ra { u_int reserved : 5; }; -struct in6_prefix { - struct sockaddr_in6 prefix; - struct prf_ra raflags; - time_t expire; - u_int32_t vltime; - u_int32_t pltime; - u_int32_t flags; - int refcnt; - u_short if_index; - u_short advrtrs; /* number of advertisement routers */ - u_char prefixlen; - u_char origin; -#define PR_ORIG_RA 0 -#define PR_ORIG_RR 1 -#define PR_ORIG_STATIC 2 -#define PR_ORIG_KERNEL 3 - /* struct sockaddr_in6 advrtr[] */ -}; - struct in6_ndireq { char ifname[IFNAMSIZ]; struct nd_ifinfo ndi; @@ -217,7 +190,6 @@ int nd6_ioctl(u_long, caddr_t, struct ifnet *); void nd6_cache_lladdr(struct ifnet *, struct in6_addr *, char *, int, int, int); int nd6_resolve(struct ifnet *, struct rtentry *, struct mbuf *, struct sockaddr *, u_char *); -int nd6_sysctl(int, void *, size_t *, void *, size_t); int nd6_need_cache(struct ifnet *); void nd6_na_input(struct mbuf *, int, int); |