Subject: bin/18435: -current route6d is broken
To: None <gnats-bugs@gnats.netbsd.org>
From: None <naoki@fukaumi.org>
List: netbsd-bugs
Date: 09/27/2002 20:09:16
>Number:         18435
>Category:       bin
>Synopsis:       -current route6d is broken
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 27 04:10:01 PDT 2002
>Closed-Date:
>Last-Modified:
>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:
>Unformatted: