instead of abusing RTF_CLONING.
Fix a leak reporeted by Aaron Riekenberg on misc@, ok sthen@
-/* $OpenBSD: show.c,v 1.103 2015/11/27 16:26:52 benno Exp $ */
+/* $OpenBSD: show.c,v 1.104 2016/07/13 08:40:46 mpi Exp $ */
/* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */
/*
{ RTF_DYNAMIC, 'D' },
{ RTF_MODIFIED, 'M' },
{ RTF_DONE, 'd' }, /* Completed -- for routing messages only */
- { RTF_MASK, 'm' }, /* Mask Present -- for routing messages only */
{ RTF_CLONING, 'C' },
+ { RTF_MULTICAST,'m' },
{ RTF_LLINFO, 'L' },
{ RTF_STATIC, 'S' },
{ RTF_PROTO1, '1' },
-.\" $OpenBSD: route.4,v 1.40 2016/03/23 12:57:53 benno Exp $
+.\" $OpenBSD: route.4,v 1.41 2016/07/13 08:40:46 mpi Exp $
.\" $NetBSD: route.4,v 1.3 1994/11/30 16:22:31 jtc Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\"
.\" @(#)route.4 8.6 (Berkeley) 4/19/94
.\"
-.Dd $Mdocdate: March 23 2016 $
+.Dd $Mdocdate: July 13 2016 $
.Dt ROUTE 4
.Os
.Sh NAME
#define RTF_DONE 0x40 /* message confirmed */
#define RTF_MASK 0x80 /* subnet mask present */
#define RTF_CLONING 0x100 /* generate new routes on use */
+#define RTF_MULTICAST 0x200 /* route associated to a mcast addr. */
#define RTF_LLINFO 0x400 /* generated by ARP or NDP */
#define RTF_STATIC 0x800 /* manually added */
#define RTF_BLACKHOLE 0x1000 /* just discard pkts (during updates) */
-/* $OpenBSD: route.h,v 1.140 2016/07/11 13:06:31 bluhm Exp $ */
+/* $OpenBSD: route.h,v 1.141 2016/07/13 08:40:46 mpi Exp $ */
/* $NetBSD: route.h,v 1.9 1996/02/13 22:00:49 christos Exp $ */
/*
#define RTF_DONE 0x40 /* message confirmed */
#define RTF_MASK 0x80 /* subnet mask present */
#define RTF_CLONING 0x100 /* generate new routes on use */
-/* 0x200 unused */
+#define RTF_MULTICAST 0x200 /* route associated to a mcast addr. */
#define RTF_LLINFO 0x400 /* generated by ARP or ND */
#define RTF_STATIC 0x800 /* manually added */
#define RTF_BLACKHOLE 0x1000 /* just discard pkts (during updates) */
-/* $OpenBSD: if_ether.c,v 1.217 2016/07/11 09:23:06 mpi Exp $ */
+/* $OpenBSD: if_ether.c,v 1.218 2016/07/13 08:40:46 mpi Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
timeout_add_sec(&arptimer_to, 1);
}
- if (rt->rt_flags & (RTF_GATEWAY|RTF_BROADCAST))
+ if (ISSET(rt->rt_flags, RTF_GATEWAY|RTF_BROADCAST|RTF_MULTICAST))
return;
switch (req) {
-/* $OpenBSD: in6.c,v 1.188 2016/07/05 10:17:14 mpi Exp $ */
+/* $OpenBSD: in6.c,v 1.189 2016/07/13 08:40:46 mpi Exp $ */
/* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */
/*
info.rti_info[RTAX_GATEWAY] = sin6tosa(&ia6->ia_addr);
info.rti_info[RTAX_NETMASK] = sin6tosa(&mltmask);
info.rti_info[RTAX_IFA] = sin6tosa(&ia6->ia_addr);
- /* XXX: we need RTF_CLONING to fake nd6_rtrequest */
- info.rti_flags = RTF_CLONING;
+ info.rti_flags = RTF_MULTICAST;
error = rtrequest(RTM_ADD, &info, RTP_CONNECTED, NULL,
ifp->if_rdomain);
if (error)
info.rti_info[RTAX_GATEWAY] = sin6tosa(&ia6->ia_addr);
info.rti_info[RTAX_NETMASK] = sin6tosa(&mltmask);
info.rti_info[RTAX_IFA] = sin6tosa(&ia6->ia_addr);
- info.rti_flags = RTF_CLONING;
+ info.rti_flags = RTF_MULTICAST;
error = rtrequest(RTM_ADD, &info, RTP_CONNECTED, NULL,
ifp->if_rdomain);
if (error)
-/* $OpenBSD: nd6.c,v 1.187 2016/07/13 01:51:22 dlg Exp $ */
+/* $OpenBSD: nd6.c,v 1.188 2016/07/13 08:40:46 mpi Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
dr->installed = 0;
}
- if ((rt->rt_flags & RTF_GATEWAY) != 0)
+ if (ISSET(rt->rt_flags, RTF_GATEWAY|RTF_MULTICAST))
return;
if (nd6_need_cache(ifp) == 0 && (rt->rt_flags & RTF_HOST) == 0) {
-.\" $OpenBSD: netstat.1,v 1.77 2015/09/11 20:10:26 mpi Exp $
+.\" $OpenBSD: netstat.1,v 1.78 2016/07/13 08:40:46 mpi Exp $
.\" $NetBSD: netstat.1,v 1.11 1995/10/03 21:42:43 thorpej Exp $
.\"
.\" Copyright (c) 1983, 1990, 1992, 1993
.\"
.\" from: @(#)netstat.1 8.8 (Berkeley) 4/18/94
.\"
-.Dd $Mdocdate: September 11 2015 $
+.Dd $Mdocdate: July 13 2016 $
.Dt NETSTAT 1
.Os
.Sh NAME
.It L Ta RTF_LLINFO Ta "Valid protocol to link address translation."
.It l Ta RTF_LOCAL Ta "Correspond to a local address."
.It M Ta RTF_MODIFIED Ta "Modified dynamically (by redirect)."
+.It m Ta RTF_MULTICAST Ta "Correspond to a multicast address."
.It P Ta RTF_MPATH Ta "Multipath route."
.It R Ta RTF_REJECT Ta "Host or net unreachable."
.It S Ta RTF_STATIC Ta "Manually added."
-/* $OpenBSD: show.c,v 1.49 2015/09/11 20:10:26 mpi Exp $ */
+/* $OpenBSD: show.c,v 1.50 2016/07/13 08:40:46 mpi Exp $ */
/* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */
/*
{ RTF_DYNAMIC, 'D' },
{ RTF_MODIFIED, 'M' },
{ RTF_DONE, 'd' }, /* Completed -- for routing messages only */
- { RTF_MASK, 'm' }, /* Mask Present -- for routing messages only */
{ RTF_CLONING, 'C' },
+ { RTF_MULTICAST,'m' },
{ RTF_LLINFO, 'L' },
{ RTF_STATIC, 'S' },
{ RTF_PROTO1, '1' },
-/* $OpenBSD: route6d.c,v 1.87 2016/07/06 16:38:09 jca Exp $ */
+/* $OpenBSD: route6d.c,v 1.88 2016/07/13 08:40:46 mpi Exp $ */
/* $KAME: route6d.c,v 1.111 2006/10/25 06:38:13 jinmei Exp $ */
/*
RTFLAG("D", RTF_DYNAMIC);
RTFLAG("M", RTF_MODIFIED);
RTFLAG("d", RTF_DONE);
-#ifdef RTF_MASK
- RTFLAG("m", RTF_MASK);
-#endif
+ RTFLAG("m", RTF_MULTICAST);
RTFLAG("C", RTF_CLONING);
-#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("L", RTF_LLINFO);
RTFLAG("S", RTF_STATIC);
RTFLAG("B", RTF_BLACKHOLE);
-#ifdef RTF_PROTO3
RTFLAG("3", RTF_PROTO3);
-#endif
RTFLAG("2", RTF_PROTO2);
RTFLAG("1", RTF_PROTO1);
-#ifdef RTF_BROADCAST
RTFLAG("b", RTF_BROADCAST);
-#endif
-#ifdef RTF_DEFAULT
- RTFLAG("d", RTF_DEFAULT);
-#endif
-#ifdef RTF_ISAROUTER
- RTFLAG("r", RTF_ISAROUTER);
-#endif
-#ifdef RTF_TUNNEL
- RTFLAG("T", RTF_TUNNEL);
-#endif
-#ifdef RTF_AUTH
- RTFLAG("A", RTF_AUTH);
-#endif
-#ifdef RTF_CRYPT
- RTFLAG("E", RTF_CRYPT);
-#endif
#undef RTFLAG
return buf;
}