svn commit: r339453 - head/usr.sbin/rtsold
Mark Johnston
markj at FreeBSD.org
Sat Oct 20 17:40:31 UTC 2018
Author: markj
Date: Sat Oct 20 17:40:30 2018
New Revision: 339453
URL: https://svnweb.freebsd.org/changeset/base/339453
Log:
Remove some obsolete compatibility code.
No functional change intended.
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Modified:
head/usr.sbin/rtsold/rtsock.c
head/usr.sbin/rtsold/rtsold.c
Modified: head/usr.sbin/rtsold/rtsock.c
==============================================================================
--- head/usr.sbin/rtsold/rtsock.c Sat Oct 20 17:36:00 2018 (r339452)
+++ head/usr.sbin/rtsold/rtsock.c Sat Oct 20 17:40:30 2018 (r339453)
@@ -65,19 +65,15 @@
((ap)->sa_len ? ROUNDUP((ap)->sa_len, sizeof(u_long)) \
: sizeof(u_long)))
-#ifdef RTM_IFANNOUNCE /*NetBSD 1.5 or later*/
static int rtsock_input_ifannounce(int, struct rt_msghdr *, char *);
-#endif
static struct {
u_char type;
size_t minlen;
int (*func)(int, struct rt_msghdr *, char *);
} rtsock_dispatch[] = {
-#ifdef RTM_IFANNOUNCE /*NetBSD 1.5 or later*/
{ RTM_IFANNOUNCE, sizeof(struct if_announcemsghdr),
rtsock_input_ifannounce },
-#endif
{ 0, 0, NULL },
};
@@ -135,7 +131,6 @@ rtsock_input(int s)
return (ret);
}
-#ifdef RTM_IFANNOUNCE /*NetBSD 1.5 or later*/
static int
rtsock_input_ifannounce(int s __unused, struct rt_msghdr *rtm, char *lim)
{
@@ -174,4 +169,3 @@ rtsock_input_ifannounce(int s __unused, struct rt_msgh
return (0);
}
-#endif
Modified: head/usr.sbin/rtsold/rtsold.c
==============================================================================
--- head/usr.sbin/rtsold/rtsold.c Sat Oct 20 17:36:00 2018 (r339452)
+++ head/usr.sbin/rtsold/rtsold.c Sat Oct 20 17:40:30 2018 (r339453)
@@ -33,10 +33,9 @@
* $FreeBSD$
*/
-#include <sys/types.h>
+#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
-#include <sys/param.h>
#include <net/if.h>
#include <net/if_dl.h>
@@ -98,10 +97,6 @@ static int do_dump;
static const char *dumpfilename = RTSOL_DUMPFILE;
#endif
-#if 0
-static int ifreconfig(char *);
-#endif
-
static int make_packet(struct ifinfo *);
static struct timespec *rtsol_check_timer(void);
@@ -217,16 +212,6 @@ main(int argc, char **argv)
pidfilename);
}
-#if (__FreeBSD_version < 900000)
- if (Fflag) {
- setinet6sysctl(IPV6CTL_FORWARDING, 0);
- } else {
- /* warn if forwarding is up */
- if (getinet6sysctl(IPV6CTL_FORWARDING))
- warnx("kernel is configured as a router, not a host");
- }
-#endif
-
#ifndef SMALL
/* initialization to dump internal status to a file */
signal(SIGUSR1, rtsold_set_dump_file);
@@ -458,33 +443,6 @@ iflist_init(void)
free(ifi);
}
}
-
-#if 0
-static int
-ifreconfig(char *ifname)
-{
- struct ifinfo *ifi, *prev;
- int rv;
-
- prev = NULL;
- TAILQ_FOREACH(ifi, &ifinfo_head, ifi_next) {
- if (strncmp(ifi->ifname, ifname, sizeof(ifi->ifname)) == 0)
- break;
- prev = ifi;
- }
- prev->next = ifi->next;
-
- rv = ifconfig(ifname);
-
- /* reclaim it after ifconfig() in case ifname is pointer inside ifi */
- if (ifi->rs_data)
- free(ifi->rs_data);
- free(ifi->sdl);
- free(ifi);
-
- return (rv);
-}
-#endif
struct rainfo *
find_rainfo(struct ifinfo *ifi, struct sockaddr_in6 *sin6)
More information about the svn-src-all
mailing list