summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-03-15 06:49:32 +0000
committerglebius <glebius@FreeBSD.org>2014-03-15 06:49:32 +0000
commit8293a6c1cc71ff884e6fb58936226f3c0bd21488 (patch)
treef0654361bf193ca78ae36513018fc48eb7191354 /usr.sbin
parent26805845a96cf60ea59d92d96cf752d7a38152f1 (diff)
downloadFreeBSD-src-8293a6c1cc71ff884e6fb58936226f3c0bd21488.zip
FreeBSD-src-8293a6c1cc71ff884e6fb58936226f3c0bd21488.tar.gz
Garbage collect long time obsoleted (or never used) stuff from routing API.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/route.c19
-rw-r--r--usr.sbin/route6d/route6d.c21
2 files changed, 2 insertions, 38 deletions
diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c
index e7db97e..758b403 100644
--- a/usr.sbin/ppp/route.c
+++ b/usr.sbin/ppp/route.c
@@ -158,26 +158,16 @@ static struct bits {
{ RTF_MODIFIED, 'M' },
{ RTF_DONE, 'd' },
{ RTF_XRESOLVE, 'X' },
-#ifdef RTF_CLONING
- { RTF_CLONING, 'C' },
-#endif
{ RTF_STATIC, 'S' },
{ RTF_PROTO1, '1' },
{ RTF_PROTO2, '2' },
{ RTF_BLACKHOLE, 'B' },
-
#ifdef RTF_LLINFO
{ RTF_LLINFO, 'L' },
#endif
#ifdef RTF_CLONING
{ RTF_CLONING, 'C' },
#endif
-#ifdef RTF_WASCLONED
- { RTF_WASCLONED, 'W' },
-#endif
-#ifdef RTF_PRCLONING
- { RTF_PRCLONING, 'c' },
-#endif
#ifdef RTF_PROTO3
{ RTF_PROTO3, '3' },
#endif
@@ -187,10 +177,6 @@ static struct bits {
{ 0, '\0' }
};
-#ifndef RTF_WASCLONED
-#define RTF_WASCLONED (0)
-#endif
-
static void
p_flags(struct prompt *prompt, u_int32_t f, unsigned max)
{
@@ -434,7 +420,7 @@ route_IfDelete(struct bundle *bundle, int all)
* route X was cloned from route Y (and is no longer there 'cos it
* may have gone with route Y).
*/
- if (RTF_WASCLONED == 0 && pass == 0)
+ if (pass == 0)
/* So we can't tell ! */
continue;
for (cp = sp; cp < ep; cp += rtm->rtm_msglen) {
@@ -461,8 +447,7 @@ route_IfDelete(struct bundle *bundle, int all)
sa[RTAX_GATEWAY]->sa_family == AF_INET6 ||
#endif
sa[RTAX_GATEWAY]->sa_family == AF_LINK) {
- if ((pass == 0 && (rtm->rtm_flags & RTF_WASCLONED)) ||
- (pass == 1 && !(rtm->rtm_flags & RTF_WASCLONED))) {
+ if (pass == 1) {
ncprange_setsa(&range, sa[RTAX_DST], sa[RTAX_NETMASK]);
rt_Set(bundle, RTM_DELETE, &range, NULL, 0, 0);
} else
diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c
index 94fb3ae..f7d27de 100644
--- a/usr.sbin/route6d/route6d.c
+++ b/usr.sbin/route6d/route6d.c
@@ -1901,10 +1901,6 @@ rtrecv(void)
if (!rt_deladdr(ifcp, rta[RTAX_IFA], rta[RTAX_NETMASK]))
iface++;
break;
- case RTM_OLDADD:
- case RTM_OLDDEL:
- trace(1, "\tnot supported yet, ignored\n");
- break;
}
}
@@ -2467,17 +2463,9 @@ do { \
RTTYPE("REDIRECT", RTM_REDIRECT);
RTTYPE("MISS", RTM_MISS);
RTTYPE("LOCK", RTM_LOCK);
- RTTYPE("OLDADD", RTM_OLDADD);
- RTTYPE("OLDDEL", RTM_OLDDEL);
RTTYPE("NEWADDR", RTM_NEWADDR);
RTTYPE("DELADDR", RTM_DELADDR);
RTTYPE("IFINFO", RTM_IFINFO);
-#ifdef RTM_OLDADD
- RTTYPE("OLDADD", RTM_OLDADD);
-#endif
-#ifdef RTM_OLDDEL
- RTTYPE("OLDDEL", RTM_OLDDEL);
-#endif
#ifdef RTM_OIFINFO
RTTYPE("OIFINFO", RTM_OIFINFO);
#endif
@@ -2518,18 +2506,9 @@ do { \
#ifdef RTF_MASK
RTFLAG("m", RTF_MASK);
#endif
-#ifdef RTF_CLONING
- RTFLAG("C", RTF_CLONING);
-#endif
#ifdef RTF_CLONED
RTFLAG("c", RTF_CLONED);
#endif
-#ifdef RTF_PRCLONING
- RTFLAG("c", RTF_PRCLONING);
-#endif
-#ifdef RTF_WASCLONED
- RTFLAG("W", RTF_WASCLONED);
-#endif
RTFLAG("X", RTF_XRESOLVE);
#ifdef RTF_LLINFO
RTFLAG("L", RTF_LLINFO);
OpenPOWER on IntegriCloud