Hi,

There are two flags which are not used or only used by the kernel
(outgoing to userland). When userlands sends rt messages with these flags
they do no harm but show up in route(8) and netstat(1). IMO we should
scrub those flags out since they will just confuse people.

OK?
-- 
:wq Claudio

Index: net/rtsock.c
===================================================================
RCS file: /cvs/src/sys/net/rtsock.c,v
retrieving revision 1.123
diff -u -p -r1.123 rtsock.c
--- net/rtsock.c        20 Sep 2012 20:53:13 -0000      1.123
+++ net/rtsock.c        27 Nov 2012 22:13:56 -0000
@@ -543,6 +543,7 @@ route_output(struct mbuf *m, ...)
 
        /* make sure that kernel-only bits are not set */
        rtm->rtm_priority &= RTP_MASK;
+       rtm->rtm_flags &= ~(RTF_DONE|RTF_MASK);
 
        if (rtm->rtm_priority != 0) {
                if (rtm->rtm_priority > RTP_MAX) {

Reply via email to