From owner-freebsd-hackers Tue Dec 14 3: 5:59 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from penguin.wise.edt.ericsson.se (penguin-ext.wise.edt.ericsson.se [194.237.142.110]) by hub.freebsd.org (Postfix) with ESMTP id F29DD14C05 for ; Tue, 14 Dec 1999 03:05:55 -0800 (PST) (envelope-from mattias.pettersson@era.ericsson.se) Received: from era-t.ericsson.se (koff.ericsson.se [147.214.173.137]) by penguin.wise.edt.ericsson.se (8.9.3/8.9.3/WIREfire-1.5) with SMTP id MAA24582 for ; Tue, 14 Dec 1999 12:05:53 +0100 (MET) Received: from era.ericsson.se by era-t.ericsson.se (SMI-8.6/LME-DOM-2.2.5(ERA/T)) id MAA27729; Tue, 14 Dec 1999 12:05:52 +0100 Message-ID: <38562482.61968B74@era.ericsson.se> Date: Tue, 14 Dec 1999 12:05:38 +0100 From: Mattias Pettersson Organization: Ericsson Radio Systems AB X-Mailer: Mozilla 4.08 [en] (Win95; I) MIME-Version: 1.0 To: hackers@freebsd.org Subject: Route delete Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hope for someone to point me at how to easiest do a user space "route delete -host xxxx"-similar thing in the kernel of FreeBSD3. The problem is the reference count. Only calling rtrequest(RTM_DELETE, ...) will only free the route if refcount = 0. I added a loop to call all pfctlinput()s with REDIRECT to clear all cached routes in the upper layer protocols. This works fine, it clears all tcp and udp sockets. Still though, what do I do regarding the cached routes of ICMP and the likes? This isn't taken care of by my attempts. Still, "route delete" fixes this. What functions to call? Do I need to send something over the routing socket? /Mattias Pettersson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message