From f93abcea1a89d98bee9448db92456ede8c35491f Mon Sep 17 00:00:00 2001 From: maxv Date: Fri, 9 Feb 2018 18:31:52 +0000 Subject: [PATCH] Remove dead code. --- sys/netinet/in.h | 6 ++---- sys/netinet/ip_input.c | 13 ++----------- sys/netinet6/in6.h | 6 ++---- sys/netinet6/ip6_input.c | 12 ++---------- 4 files changed, 8 insertions(+), 29 deletions(-) diff --git a/sys/netinet/in.h b/sys/netinet/in.h index f76be767bab4..b26a8631bc7c 100644 --- a/sys/netinet/in.h +++ b/sys/netinet/in.h @@ -1,4 +1,4 @@ -/* $NetBSD: in.h,v 1.103 2018/01/10 10:56:30 knakahara Exp $ */ +/* $NetBSD: in.h,v 1.104 2018/02/09 18:31:52 maxv Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -450,9 +450,7 @@ struct ip_mreq { #define IPCTL_FORWARDING 1 /* act as router */ #define IPCTL_SENDREDIRECTS 2 /* may send redirects when forwarding */ #define IPCTL_DEFTTL 3 /* default TTL */ -#ifdef notyet -#define IPCTL_DEFMTU 4 /* default MTU */ -#endif +/* IPCTL_DEFMTU=4, never implemented */ #define IPCTL_FORWSRCRT 5 /* forward source-routed packets */ #define IPCTL_DIRECTEDBCAST 6 /* default broadcast behavior */ #define IPCTL_ALLOWSRCRT 7 /* allow/drop all source-routed pkts */ diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 427ab73585b0..6878751536b8 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.374 2018/02/07 08:12:25 maxv Exp $ */ +/* $NetBSD: ip_input.c,v 1.375 2018/02/09 18:31:52 maxv Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.374 2018/02/07 08:12:25 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.375 2018/02/09 18:31:52 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1640,15 +1640,6 @@ sysctl_net_inet_ip_setup(struct sysctllog **clog) NULL, 0, &ip_defttl, 0, CTL_NET, PF_INET, IPPROTO_IP, IPCTL_DEFTTL, CTL_EOL); -#ifdef IPCTL_DEFMTU - sysctl_createv(clog, 0, NULL, NULL, - CTLFLAG_PERMANENT /* |CTLFLAG_READWRITE? */, - CTLTYPE_INT, "mtu", - SYSCTL_DESCR("Default MTA for an INET route"), - NULL, 0, &ip_mtu, 0, - CTL_NET, PF_INET, IPPROTO_IP, - IPCTL_DEFMTU, CTL_EOL); -#endif /* IPCTL_DEFMTU */ sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT|CTLFLAG_READWRITE, CTLTYPE_INT, "forwsrcrt", diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index 2d568e4a75de..b493cc1b3fd9 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -1,4 +1,4 @@ -/* $NetBSD: in6.h,v 1.89 2018/01/30 15:54:02 maxv Exp $ */ +/* $NetBSD: in6.h,v 1.90 2018/02/09 18:31:52 maxv Exp $ */ /* $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ */ /* @@ -546,9 +546,7 @@ struct ip6_mtuinfo { #define IPV6CTL_FORWARDING 1 /* act as router */ #define IPV6CTL_SENDREDIRECTS 2 /* may send redirects when forwarding*/ #define IPV6CTL_DEFHLIM 3 /* default Hop-Limit */ -#ifdef notyet -#define IPV6CTL_DEFMTU 4 /* default MTU */ -#endif +/* IPV6CTL_DEFMTU=4, never implemented */ #define IPV6CTL_FORWSRCRT 5 /* forward source-routed dgrams */ #define IPV6CTL_STATS 6 /* stats */ #define IPV6CTL_MRTSTATS 7 /* multicast forwarding stats */ diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index dfedbad14c42..416d4496cf2c 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_input.c,v 1.189 2018/01/30 15:54:02 maxv Exp $ */ +/* $NetBSD: ip6_input.c,v 1.190 2018/02/09 18:31:52 maxv Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.189 2018/01/30 15:54:02 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.190 2018/02/09 18:31:52 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_gateway.h" @@ -1601,14 +1601,6 @@ sysctl_net_inet6_ip6_setup(struct sysctllog **clog) NULL, 0, &ip6_defhlim, 0, CTL_NET, PF_INET6, IPPROTO_IPV6, IPV6CTL_DEFHLIM, CTL_EOL); -#ifdef notyet - sysctl_createv(clog, 0, NULL, NULL, - CTLFLAG_PERMANENT|CTLFLAG_READWRITE, - CTLTYPE_INT, "mtu", NULL, - NULL, 0, &, 0, - CTL_NET, PF_INET6, IPPROTO_IPV6, - IPV6CTL_DEFMTU, CTL_EOL); -#endif sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT|CTLFLAG_READWRITE, CTLTYPE_INT, "maxfragpackets",