Module Name:    src
Committed By:   roy
Date:           Fri Aug 26 23:12:06 UTC 2016

Modified Files:
        src/sys/netinet: in_pcb.c raw_ip.c

Log Message:
Allow bind to detached INET addresses.


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.169 src/sys/netinet/in_pcb.c
cvs rdiff -u -r1.159 -r1.160 src/sys/netinet/raw_ip.c

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

Modified files:

Index: src/sys/netinet/in_pcb.c
diff -u src/sys/netinet/in_pcb.c:1.168 src/sys/netinet/in_pcb.c:1.169
--- src/sys/netinet/in_pcb.c:1.168	Mon Aug  1 03:15:30 2016
+++ src/sys/netinet/in_pcb.c	Fri Aug 26 23:12:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: in_pcb.c,v 1.168 2016/08/01 03:15:30 ozaki-r Exp $	*/
+/*	$NetBSD: in_pcb.c,v 1.169 2016/08/26 23:12:06 roy Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -93,7 +93,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in_pcb.c,v 1.168 2016/08/01 03:15:30 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in_pcb.c,v 1.169 2016/08/26 23:12:06 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -297,7 +297,7 @@ in_pcbbind_addr(struct inpcb *inp, struc
 		}
 		if (ia == NULL)
 			goto error;
-		if (ia->ia4_flags & (IN_IFF_NOTREADY | IN_IFF_DETACHED))
+		if (ia->ia4_flags & IN_IFF_NOTREADY)
 			goto error;
 	}
 	pserialize_read_exit(s);

Index: src/sys/netinet/raw_ip.c
diff -u src/sys/netinet/raw_ip.c:1.159 src/sys/netinet/raw_ip.c:1.160
--- src/sys/netinet/raw_ip.c:1.159	Mon Aug  1 03:15:31 2016
+++ src/sys/netinet/raw_ip.c	Fri Aug 26 23:12:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: raw_ip.c,v 1.159 2016/08/01 03:15:31 ozaki-r Exp $	*/
+/*	$NetBSD: raw_ip.c,v 1.160 2016/08/26 23:12:06 roy Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.159 2016/08/01 03:15:31 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.160 2016/08/26 23:12:06 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -581,9 +581,7 @@ rip_bind(struct socket *so, struct socka
 		error = EADDRNOTAVAIL;
 		goto release;
 	}
-        if (ifa && (ifatoia(ifa))->ia4_flags &
-	            (IN6_IFF_NOTREADY | IN_IFF_DETACHED))
-	{
+        if (ifa && (ifatoia(ifa))->ia4_flags & IN6_IFF_NOTREADY) {
 		pserialize_read_exit(ss);
 		error = EADDRNOTAVAIL;
 		goto release;

Reply via email to