Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Aug 2002 15:31:59 -0400 (EDT)
From:      John Capo <jc@irbs.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/41631: PATCH to add sysctl knob to disable cloned route messages on routing socket
Message-ID:  <20020813193159.C74A61743C@exuma.irbs.com>

next in thread | raw e-mail | index | archive | help

>Number:         41631
>Category:       kern
>Synopsis:       PATCH to add sysctl knob to disable cloned route messages on routing socket
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 13 12:40:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     John Capo
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
>Environment:
System: FreeBSD exuma.irbs.com 4.6-STABLE FreeBSD 4.6-STABLE #0: Mon Jul 15 14:09:28 EDT 2002 jc@exuma.irbs.com:/usr/src/sys/compile/EXUMA i386


	
>Description:
	
>How-To-Repeat:
	
>Fix:

	


Index: sys/net/rtsock.c
===================================================================
RCS file: /usr/cvs/src/sys/net/rtsock.c,v
retrieving revision 1.44.2.9
diff -u -r1.44.2.9 rtsock.c
--- sys/net/rtsock.c	18 Feb 2002 15:26:35 -0000	1.44.2.9
+++ sys/net/rtsock.c	13 Aug 2002 18:16:57 -0000
@@ -84,6 +84,8 @@
 #define ifaaddr	info.rti_info[RTAX_IFA]
 #define brdaddr	info.rti_info[RTAX_BRD]
 
+static int send_clones = 1;
+
 /*
  * It really doesn't make any sense at all for this code to share much
  * with raw_usrreq.c, since its functionality is so restricted.  XXX
@@ -713,6 +715,8 @@
 	register struct mbuf *m;
 	struct sockaddr *sa = rtinfo->rti_info[RTAX_DST];
 
+	if (!send_clones && (flags & RTF_WASCLONED))
+		return;
 	if (route_cb.any_count == 0)
 		return;
 	m = rt_msg1(type, rtinfo);
@@ -1025,6 +1029,9 @@
 }
 
 SYSCTL_NODE(_net, PF_ROUTE, routetable, CTLFLAG_RD, sysctl_rtsock, "");
+SYSCTL_NODE(_net, OID_AUTO, rtsock, CTLFLAG_RD, 0, "Routing Socket");
+SYSCTL_INT(_net_rtsock, OID_AUTO, announce_clones, CTLFLAG_RW, &send_clones, 0, \
+	"Announce cloned routes on routing socket");
 
 /*
  * Definitions of protocols supported in the ROUTE domain.
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020813193159.C74A61743C>