aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2003-08-08 20:14:28 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2003-08-08 20:14:28 +0000
commitbe9879af482379eb88ea1599f9ca3b6f04ffbbf7 (patch)
treecdde65bb643bb7f2a719b86659fa4ca7c2f8edad /usr.sbin
parent2f92fd9bf76761882c34bbf70abb94b027b77388 (diff)
downloadsrc-be9879af482379eb88ea1599f9ca3b6f04ffbbf7.tar.gz
src-be9879af482379eb88ea1599f9ca3b6f04ffbbf7.zip
Drop MIP6 code. We don't support MIP6 yet.
MFC after: 1 week
Notes
Notes: svn path=/head/; revision=118672
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/rtadvd/config.c88
-rw-r--r--usr.sbin/rtadvd/dump.c13
-rw-r--r--usr.sbin/rtadvd/rtadvd.c20
-rw-r--r--usr.sbin/rtadvd/rtadvd.h25
4 files changed, 4 insertions, 142 deletions
diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c
index e7d9409c907b..b754fd61b2e1 100644
--- a/usr.sbin/rtadvd/config.c
+++ b/usr.sbin/rtadvd/config.c
@@ -48,9 +48,6 @@
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
#include <netinet/icmp6.h>
-#ifdef MIP6
-#include <netinet6/mip6.h>
-#endif
#include <arpa/inet.h>
@@ -181,10 +178,6 @@ getconfig(intface)
MAYHAVE(val, "raflags", 0);
tmp->managedflg = val & ND_RA_FLAG_MANAGED;
tmp->otherflg = val & ND_RA_FLAG_OTHER;
-#ifdef MIP6
- if (mobileip6)
- tmp->haflg = val & ND_RA_FLAG_HA;
-#endif
#ifndef ND_RA_FLAG_RTPREF_MASK
#define ND_RA_FLAG_RTPREF_MASK 0x18 /* 00011000 */
#define ND_RA_FLAG_RTPREF_RSV 0x10 /* 00010000 */
@@ -238,39 +231,12 @@ getconfig(intface)
}
tmp->retranstimer = (u_int32_t)val64;
-#ifndef MIP6
if (agetstr("hapref", &bp) || agetstr("hatime", &bp)) {
syslog(LOG_ERR,
"<%s> mobile-ip6 configuration not supported",
__func__);
exit(1);
}
-#else
- if (!mobileip6) {
- if (agetstr("hapref", &bp) || agetstr("hatime", &bp)) {
- syslog(LOG_ERR,
- "<%s> mobile-ip6 configuration without "
- "proper command line option",
- __func__);
- exit(1);
- }
- } else {
- tmp->hapref = 0;
- if ((val = agetnum("hapref")) >= 0)
- tmp->hapref = (int16_t)val;
- if (tmp->hapref != 0) {
- tmp->hatime = 0;
- MUSTHAVE(val, "hatime");
- tmp->hatime = (u_int16_t)val;
- if (tmp->hatime <= 0) {
- syslog(LOG_ERR,
- "<%s> home agent lifetime must be greater than 0",
- __func__);
- exit(1);
- }
- }
- }
-#endif
/* prefix information */
@@ -328,23 +294,12 @@ getconfig(intface)
makeentry(entbuf, sizeof(entbuf), i, "pinfoflags",
added);
-#ifdef MIP6
- if (mobileip6)
- {
- MAYHAVE(val, entbuf,
- (ND_OPT_PI_FLAG_ONLINK|ND_OPT_PI_FLAG_AUTO|
- ND_OPT_PI_FLAG_ROUTER));
- } else
-#endif
{
MAYHAVE(val, entbuf,
(ND_OPT_PI_FLAG_ONLINK|ND_OPT_PI_FLAG_AUTO));
}
pfx->onlinkflg = val & ND_OPT_PI_FLAG_ONLINK;
pfx->autoconfflg = val & ND_OPT_PI_FLAG_AUTO;
-#ifdef MIP6
- pfx->routeraddr = val & ND_OPT_PI_FLAG_ROUTER;
-#endif
makeentry(entbuf, sizeof(entbuf), i, "vltime", added);
MAYHAVE(val64, entbuf, DEF_ADVVALIDLIFETIME);
@@ -871,10 +826,6 @@ make_packet(struct rainfo *rainfo)
struct nd_router_advert *ra;
struct nd_opt_prefix_info *ndopt_pi;
struct nd_opt_mtu *ndopt_mtu;
-#ifdef MIP6
- struct nd_opt_advinterval *ndopt_advint;
- struct nd_opt_homeagent_info *ndopt_hai;
-#endif
struct nd_opt_route_info *ndopt_rti;
struct prefix *pfx;
struct rtinfo *rti;
@@ -895,12 +846,6 @@ make_packet(struct rainfo *rainfo)
packlen += sizeof(struct nd_opt_prefix_info) * rainfo->pfxs;
if (rainfo->linkmtu)
packlen += sizeof(struct nd_opt_mtu);
-#ifdef MIP6
- if (mobileip6 && rainfo->maxinterval)
- packlen += sizeof(struct nd_opt_advinterval);
- if (mobileip6 && rainfo->hatime)
- packlen += sizeof(struct nd_opt_homeagent_info);
-#endif
#ifdef ND_OPT_ROUTE_INFO
for (rti = rainfo->route.next; rti != &rainfo->route; rti = rti->next)
packlen += sizeof(struct nd_opt_route_info) +
@@ -941,10 +886,6 @@ make_packet(struct rainfo *rainfo)
rainfo->managedflg ? ND_RA_FLAG_MANAGED : 0;
ra->nd_ra_flags_reserved |=
rainfo->otherflg ? ND_RA_FLAG_OTHER : 0;
-#ifdef MIP6
- ra->nd_ra_flags_reserved |=
- rainfo->haflg ? ND_RA_FLAG_HA : 0;
-#endif
ra->nd_ra_router_lifetime = htons(rainfo->lifetime);
ra->nd_ra_reachable = htonl(rainfo->reachabletime);
ra->nd_ra_retransmit = htonl(rainfo->retranstimer);
@@ -964,30 +905,6 @@ make_packet(struct rainfo *rainfo)
buf += sizeof(struct nd_opt_mtu);
}
-#ifdef MIP6
- if (mobileip6 && rainfo->maxinterval) {
- ndopt_advint = (struct nd_opt_advinterval *)buf;
- ndopt_advint->nd_opt_adv_type = ND_OPT_ADVINTERVAL;
- ndopt_advint->nd_opt_adv_len = 1;
- ndopt_advint->nd_opt_adv_reserved = 0;
- ndopt_advint->nd_opt_adv_interval = htonl(rainfo->maxinterval *
- 1000);
- buf += sizeof(struct nd_opt_advinterval);
- }
-#endif
-
-#ifdef MIP6
- if (rainfo->hatime) {
- ndopt_hai = (struct nd_opt_homeagent_info *)buf;
- ndopt_hai->nd_opt_hai_type = ND_OPT_HOMEAGENT_INFO;
- ndopt_hai->nd_opt_hai_len = 1;
- ndopt_hai->nd_opt_hai_reserved = 0;
- ndopt_hai->nd_opt_hai_preference = htons(rainfo->hapref);
- ndopt_hai->nd_opt_hai_lifetime = htons(rainfo->hatime);
- buf += sizeof(struct nd_opt_homeagent_info);
- }
-#endif
-
for (pfx = rainfo->prefix.next;
pfx != &rainfo->prefix; pfx = pfx->next) {
u_int32_t vltime, pltime;
@@ -1004,11 +921,6 @@ make_packet(struct rainfo *rainfo)
if (pfx->autoconfflg)
ndopt_pi->nd_opt_pi_flags_reserved |=
ND_OPT_PI_FLAG_AUTO;
-#ifdef MIP6
- if (pfx->routeraddr)
- ndopt_pi->nd_opt_pi_flags_reserved |=
- ND_OPT_PI_FLAG_ROUTER;
-#endif
if (pfx->timer)
vltime = 0;
else {
diff --git a/usr.sbin/rtadvd/dump.c b/usr.sbin/rtadvd/dump.c
index 796ba90395af..122f31fa3daf 100644
--- a/usr.sbin/rtadvd/dump.c
+++ b/usr.sbin/rtadvd/dump.c
@@ -148,21 +148,13 @@ if_dump()
"MinAdvInterval: %d\n", rai->lifetime, rai->maxinterval,
rai->mininterval);
fprintf(fp, " Flags: %s%s%s, ",
- rai->managedflg ? "M" : "", rai->otherflg ? "O" : "",
-#ifdef MIP6
- rai->haflg ? "H" :
-#endif
- "");
+ rai->managedflg ? "M" : "", rai->otherflg ? "O" : "", "");
fprintf(fp, "Preference: %s, ",
rtpref_str[(rai->rtpref >> 3) & 0xff]);
fprintf(fp, "MTU: %d\n", rai->linkmtu);
fprintf(fp, " ReachableTime: %d, RetransTimer: %d, "
"CurHopLimit: %d\n", rai->reachabletime,
rai->retranstimer, rai->hoplimit);
-#ifdef MIP6
- fprintf(fp, " HAPreference: %d, HALifetime: %d\n",
- rai->hapref, rai->hatime);
-#endif
if (rai->clockskew)
fprintf(fp, " Clock skew: %ldsec\n",
@@ -212,9 +204,6 @@ if_dump()
fprintf(fp, "flags: %s%s%s",
pfx->onlinkflg ? "L" : "",
pfx->autoconfflg ? "A" : "",
-#ifdef MIP6
- pfx->routeraddr ? "R" :
-#endif
"");
if (pfx->timer) {
struct timeval *rest;
diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c
index 96739620ec0a..2d88c8fae204 100644
--- a/usr.sbin/rtadvd/rtadvd.c
+++ b/usr.sbin/rtadvd/rtadvd.c
@@ -81,9 +81,6 @@ static char *pidfilename = "/var/run/rtadvd.pid"; /* should be configurable */
static char *mcastif;
int sock;
int rtsock = -1;
-#ifdef MIP6
-int mobileip6 = 0;
-#endif
int accept_rr = 0;
int dflag = 0, sflag = 0;
@@ -159,13 +156,7 @@ main(argc, argv)
openlog("rtadvd", LOG_NDELAY|LOG_PID, LOG_DAEMON);
/* get command line options and arguments */
-#ifdef MIP6
-#define OPTIONS "c:dDfM:mRs"
-#else
-#define OPTIONS "c:dDfM:Rs"
-#endif
- while ((ch = getopt(argc, argv, OPTIONS)) != -1) {
-#undef OPTIONS
+ while ((ch = getopt(argc, argv, "c:dDfM:Rs")) != -1) {
switch (ch) {
case 'c':
conffile = optarg;
@@ -182,11 +173,6 @@ main(argc, argv)
case 'M':
mcastif = optarg;
break;
-#ifdef MIP6
- case 'm':
- mobileip6 = 1;
- break;
-#endif
case 'R':
fprintf(stderr, "rtadvd: "
"the -R option is currently ignored.\n");
@@ -202,11 +188,7 @@ main(argc, argv)
argv += optind;
if (argc == 0) {
fprintf(stderr,
-#ifdef MIP6
- "usage: rtadvd [-dDfMmRs] [-c conffile] "
-#else
"usage: rtadvd [-dDfMRs] [-c conffile] "
-#endif
"interfaces...\n");
exit(1);
}
diff --git a/usr.sbin/rtadvd/rtadvd.h b/usr.sbin/rtadvd/rtadvd.h
index c3912495f6a6..a25e861617f6 100644
--- a/usr.sbin/rtadvd/rtadvd.h
+++ b/usr.sbin/rtadvd/rtadvd.h
@@ -46,20 +46,12 @@
#define DEF_ADVPREFERREDLIFETIME 604800
/*XXX int-to-double comparison for INTERVAL items */
-#ifndef MIP6
-#define mobileip6 0
-#endif
-
#define MAXROUTERLIFETIME 9000
-#define MIN_MAXINTERVAL (mobileip6 ? 1.5 : 4.0)
+#define MIN_MAXINTERVAL 4.0
#define MAX_MAXINTERVAL 1800
-#define MIN_MININTERVAL (mobileip6 ? 0.5 : 3)
+#define MIN_MININTERVAL 3
#define MAXREACHABLETIME 3600000
-#ifndef MIP6
-#undef miobileip6
-#endif
-
#define MAX_INITIAL_RTR_ADVERT_INTERVAL 16
#define MAX_INITIAL_RTR_ADVERTISEMENTS 3
#define MAX_FINAL_RTR_ADVERTISEMENTS 3
@@ -86,9 +78,6 @@ struct prefix {
long pltimeexpire; /* expiration of pltime; decrement case only */
u_int onlinkflg; /* bool: AdvOnLinkFlag */
u_int autoconfflg; /* bool: AdvAutonomousFlag */
-#ifdef MIP6
- u_int routeraddr; /* bool: RouterAddress */
-#endif
int prefixlen;
int origin; /* from kernel or config */
struct in6_addr prefix;
@@ -132,9 +121,6 @@ struct rainfo {
u_int mininterval; /* MinRtrAdvInterval */
int managedflg; /* AdvManagedFlag */
int otherflg; /* AdvOtherConfigFlag */
-#ifdef MIP6
- int haflg; /* HAFlag */
-#endif
int rtpref; /* router preference */
u_int32_t linkmtu; /* AdvLinkMTU */
@@ -145,10 +131,6 @@ struct rainfo {
int pfxs; /* number of prefixes */
long clockskew; /* used for consisitency check of lifetimes */
-#ifdef MIP6
- u_short hapref; /* Home Agent Preference */
- u_short hatime; /* Home Agent Lifetime */
-#endif
struct rtinfo route; /* route information option (link head) */
int routes; /* number of route information options */
@@ -174,6 +156,3 @@ struct rainfo *if_indextorainfo __P((int));
struct prefix *find_prefix __P((struct rainfo *, struct in6_addr *, int));
extern struct in6_addr in6a_site_allrouters;
-#ifdef MIP6
-extern int mobileip6;
-#endif