NetBSD Problem Report #18435

Received: (qmail 15754 invoked by uid 605); 27 Sep 2002 11:09:18 -0000
Message-Id: <200209271109.g8RB9GU20608@mail.fukaumi.org>
Date: Fri, 27 Sep 2002 20:09:16 +0900 (JST)
From: naoki@fukaumi.org
Sender: gnats-bugs-owner@netbsd.org
Reply-To: naoki@fukaumi.org
To: gnats-bugs@gnats.netbsd.org
Cc: naoki@fukaumi.org
Subject: -current route6d is broken
X-Send-Pr-Version: 3.95

>Number:         18435
>Category:       bin
>Synopsis:       -current route6d is broken
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 27 11:10:01 +0000 2002
>Closed-Date:    Fri Sep 27 14:43:31 +0000 2002
>Last-Modified:  Fri Sep 27 14:44:00 +0000 2002
>Originator:     FUKAUMI Naoki
>Release:        NetBSD 1.6I (2002/9/26 source)
>Organization:
	FUKAUMI Naoki
>Environment:
	NetBSD 1.6I
>Description:
	I can't use route6d. If I exec "route6d -d", I got error
	  rip IPV6_V6ONLY: Invalid argument
	and route6d was terminated soon.

>How-To-Repeat:
	route6d -d

>Fix:
	This is patch. route6d will start up.
	But I don't know this is correct way or not.

--- route6d.c.orig	Tue Sep 24 22:48:14 2002
+++ route6d.c	Fri Sep 27 19:44:26 2002
@@ -591,13 +591,13 @@
 		fatal("rip socket");
 		/*NOTREACHED*/
 	}
-	if (bind(ripsock, res->ai_addr, res->ai_addrlen) < 0) {
-		fatal("rip bind");
-		/*NOTREACHED*/
-	}
 	if (setsockopt(ripsock, IPPROTO_IPV6, IPV6_V6ONLY,
 	    &int1, sizeof(int1)) < 0) {
 		fatal("rip IPV6_V6ONLY");
+		/*NOTREACHED*/
+	}
+	if (bind(ripsock, res->ai_addr, res->ai_addrlen) < 0) {
+		fatal("rip bind");
 		/*NOTREACHED*/
 	}
 	if (setsockopt(ripsock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS,
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: itojun 
State-Changed-When: Fri Sep 27 07:43:14 PDT 2002 
State-Changed-Why:  
fixed 

From: Jun-ichiro itojun Hagino <itojun@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pr/18435 CVS commit: basesrc/usr.sbin/route6d
Date: Fri, 27 Sep 2002 17:43:01 +0300 (EEST)

 Module Name:	basesrc
 Committed By:	itojun
 Date:		Fri Sep 27 14:43:01 UTC 2002

 Modified Files:
 	basesrc/usr.sbin/route6d: route6d.c

 Log Message:
 IPV6_V6ONLY setsockopt has to happen before bind(2). PR 18435


 To generate a diff of this commit:
 cvs rdiff -r1.42 -r1.43 basesrc/usr.sbin/route6d/route6d.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.