} else {
/* Address generated routes are RTPROT_KERNEL,
* otherwise RTPROT_BOOT */
+#ifdef RTPROT_RA
+ if (rt->rt_dflags & RTDF_RA)
+ nlm.rt.rtm_protocol = RTPROT_RA;
+ else
+#endif
if (rt->rt_dflags & RTDF_IFA_ROUTE)
nlm.rt.rtm_protocol = RTPROT_KERNEL;
else
#ifdef HAVE_ROUTE_METRIC
rt->rt_metric = ifp->metric;
#endif
- if (rap != NULL)
+ if (rap != NULL) {
rt->rt_mtu = rap->mtu;
+ rt->rt_dflags |= RTDF_RA;
+ }
return rt;
}
unsigned int rt_metric;
#endif
unsigned int rt_dflags;
-#define RTDF_INIT 0x01 /* Generated by if_initrt() */
-#define RTDF_IFA_ROUTE 0x02 /* Address generated route */
-#define RTDF_FAKE 0x04 /* Maybe us on lease reboot */
+#define RTDF_INIT 0x01 /* Generated by if_initrt() */
+#define RTDF_IFA_ROUTE 0x02 /* Address generated route */
+#define RTDF_FAKE 0x04 /* Maybe us on lease reboot */
+#define RTDF_RA 0x08 /* Router Advertisement */
};
TAILQ_HEAD(rt_head, rt);