Re: divert-to with sockets bound to any

2013-06-19 Thread Reyk Floeter
On Wed, Jun 19, 2013 at 08:00:01PM +0200, Reyk Floeter wrote:
 OK?
 

I forgot the in6_pcblookup_listen() case, updated diff below.

Reyk

Index: sys/netinet/in_pcb.c
===
RCS file: /cvs/src/sys/netinet/in_pcb.c,v
retrieving revision 1.139
diff -u -p -u -p -r1.139 in_pcb.c
--- sys/netinet/in_pcb.c1 Jun 2013 13:25:40 -   1.139
+++ sys/netinet/in_pcb.c19 Jun 2013 18:18:12 -
@@ -1004,7 +1004,8 @@ in_pcblookup_listen(struct inpcbtable *t
 
if ((divert = pf_find_divert(m)) == NULL)
return (NULL);
-   key1 = key2 = divert-addr.v4;
+   key1 = divert-addr.v4;
+   key2 = zeroin_addr;
lport = divert-port;
} else
 #endif
@@ -1076,7 +1077,8 @@ in6_pcblookup_listen(struct inpcbtable *
 
if ((divert = pf_find_divert(m)) == NULL)
return (NULL);
-   key1 = key2 = divert-addr.v6;
+   key1 = divert-addr.v6;
+   key2 = zeroin6_addr;
lport = divert-port;
} else
 #endif



Re: divert-to with sockets bound to any

2013-06-19 Thread Mike Belopuhov
On 19 June 2013 20:20, Reyk Floeter r...@openbsd.org wrote:
 On Wed, Jun 19, 2013 at 08:00:01PM +0200, Reyk Floeter wrote:
 OK?


 I forgot the in6_pcblookup_listen() case, updated diff below.

 Reyk


it boils down to the pcb lookup magic as i thought;  ok mikeb.