On Wed, Mar 30, 2016 at 09:17:52PM +0200, Vincent Gross wrote:
> Hi, can you apply this diff and check if the problem persists ?

It does not help my syslogd regression test.

cd /usr/src/regress/usr.sbin/syslogd && SUDO=sudo make 
run-regress-args-server-udp6.pl

I have also tried memset(&valid, 0, sizeof(valid)), but it did not help.

When I replace the goto release with a debug printf(), this test
passes.  Then I get a bunch of these lines:

udp6_output: pcb addr not avail: inp laddr ::, src laddr ::1

bluhm

Index: netinet6/udp6_output.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet6/udp6_output.c,v
retrieving revision 1.46
diff -u -p -r1.46 udp6_output.c
--- netinet6/udp6_output.c      23 Mar 2016 15:50:36 -0000      1.46
+++ netinet6/udp6_output.c      29 Mar 2016 20:16:11 -0000
@@ -174,8 +174,15 @@ udp6_output(struct inpcb *in6p, struct m
                        valid.sin6_family = AF_INET6;
                        valid.sin6_len = sizeof(valid);
                        error = in6_pcbaddrisavail(in6p, &valid, 0, p);
-                       if (error)
-                               goto release;
+                       if (error) {
+                               char ia[INET6_ADDRSTRLEN], sa[INET6_ADDRSTRLEN];
+                               printf("%s: pcb addr not avail: inp laddr %s, "
+                                   "src laddr %s\n", __func__,
+                                   inet_ntop(AF_INET6, &in6p->inp_laddr6,
+                                       ia, sizeof(ia)),
+                                   inet_ntop(AF_INET6, laddr,
+                                       sa, sizeof(sa)));
+                       }
                }
        } else {
                if (IN6_IS_ADDR_UNSPECIFIED(&in6p->inp_faddr6)) {

> 
> diff --git a/sys/netinet6/udp6_output.c b/sys/netinet6/udp6_output.c
> index f9473d8..fa40fcf 100644
> --- a/sys/netinet6/udp6_output.c
> +++ b/sys/netinet6/udp6_output.c
> @@ -171,6 +171,7 @@ udp6_output(struct inpcb *in6p, struct mbuf *m, struct 
> mbuf *addr6,
>               if (!IN6_ARE_ADDR_EQUAL(&in6p->inp_laddr6, laddr)) {
>                       valid.sin6_addr = *laddr;
>                       valid.sin6_port = in6p->inp_lport;
> +                     valid.sin6_scope_id = 0;
>                       valid.sin6_family = AF_INET6;
>                       valid.sin6_len = sizeof(valid);
>                       error = in6_pcbaddrisavail(in6p, &valid, 0, p);

Reply via email to