NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/55170 dhcpcd fails when used instead of rtsol



The following reply was made to PR bin/55170; it has been noted by GNATS.

From: Kimmo Suominen <kim%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/55170 dhcpcd fails when used instead of rtsol
Date: Wed, 15 Apr 2020 17:18:13 +0300

 I've tested the patch and it works -- thank you, Roy.
 
 1) As instructed in rtsol(8):
 
 revolutions:~# dhcpcd -dB6T --nodhcp6 vioif0
 dhcpcd-9.0.1 starting
 executing `/libexec/dhcpcd-run-hooks' CHROOT
 spawned privileged actioneer on PID 2726
 spawned network proxy on PID 4809
 chrooting to `/var/chroot/dhcpcd'
 vioif0: carrier acquired
 vioif0: executing `/libexec/dhcpcd-run-hooks' CARRIER
 DUID 00:01:00:01:26:22:05:77:86:56:3d:32:38:bf
 vioif0: IAID 3d:32:38:bf
 vioif0: adding address 2a09:84c0:400:5e00:55d0::33/64
 vioif0: pltime infinity, vltime infinity
 vioif0: adding route to 2a09:84c0:400:5e00::/64
 vioif0: executing `/libexec/dhcpcd-run-hooks' STATIC6
 vioif0: delaying IPv6 router solicitation for 0.0 seconds
 vioif0: soliciting an IPv6 router
 vioif0: sending Router Solicitation
 vioif0: Router Advertisement from fe80::de9f:dbff:fe28:887f
 vioif0: executing `/libexec/dhcpcd-run-hooks' TEST
 interface=vioif0
 pid=5180
 protocol=ra
 reason=TEST
 ifcarrier=up
 ifflags=35139
 ifmtu=1500
 ifwireless=0
 nd1_acquired=108767
 nd1_from=fe80::de9f:dbff:fe28:887f
 nd1_now=108767
 nd1_source_address=dc9fdb28887f
 dhcpcd exited
 
 2) Silently if invoked as shown earlier in this ticket:
 
 revolutions:~# dhcpcd -q6T --nodhcp6 vioif0
 revolutions:~#
 
 I've verified that in both cases a router solicitation is sent out.
 
 revolutions:~# tcpdump ip6
 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
 listening on vioif0, link-type EN10MB (Ethernet), capture size 262144 bytes
 
 17:12:06.962297 IP6 fe80::8456:3dff:fe32:38bf > ff02::2: ICMP6, router
 solicitation, length 16
 17:12:06.963514 IP6 fe80::de9f:dbff:fe28:887f > ff02::1: ICMP6, router
 advertisement, length 24
 17:12:06.963796 IP6 fe80::f29f:c2ff:fe12:1047 > ff02::1: ICMP6, router
 advertisement, length 24
 17:12:06.964590 IP6 fe80::de9f:dbff:fe28:887f > ff02::1: ICMP6, router
 advertisement, length 24
 17:12:06.965471 IP6 fe80::f29f:c2ff:fe12:1047 > ff02::1: ICMP6, router
 advertisement, length 24
 17:12:10.061565 IP6 fe80::de9f:dbff:fe28:887f > ff02::1: ICMP6, router
 advertisement, length 24
 17:12:10.062334 IP6 fe80::de9f:dbff:fe28:887f > ff02::1: ICMP6, router
 advertisement, length 24
 17:12:10.257712 IP6 fe80::f29f:c2ff:fe12:1047 > ff02::1: ICMP6, router
 advertisement, length 24
 17:12:10.258506 IP6 fe80::f29f:c2ff:fe12:1047 > ff02::1: ICMP6, router
 advertisement, length 24
 
 17:15:21.862777 IP6 fe80::8456:3dff:fe32:38bf > ff02::2: ICMP6, router
 solicitation, length 16
 17:15:21.863990 IP6 fe80::de9f:dbff:fe28:887f > ff02::1: ICMP6, router
 advertisement, length 24
 17:15:21.864300 IP6 fe80::f29f:c2ff:fe12:1047 > ff02::1: ICMP6, router
 advertisement, length 24
 17:15:21.865120 IP6 fe80::de9f:dbff:fe28:887f > ff02::1: ICMP6, router
 advertisement, length 24
 17:15:21.865999 IP6 fe80::f29f:c2ff:fe12:1047 > ff02::1: ICMP6, router
 advertisement, length 24
 17:15:24.903215 IP6 fe80::f29f:c2ff:fe12:1047 > ff02::1: ICMP6, router
 advertisement, length 24
 17:15:24.903933 IP6 fe80::f29f:c2ff:fe12:1047 > ff02::1: ICMP6, router
 advertisement, length 24
 17:15:25.336340 IP6 fe80::de9f:dbff:fe28:887f > ff02::1: ICMP6, router
 advertisement, length 24
 17:15:25.337187 IP6 fe80::de9f:dbff:fe28:887f > ff02::1: ICMP6, router
 advertisement, length 24
 
 On Wed, 15 Apr 2020 at 07:55, Robert Elz <kre%munnari.oz.au@localhost> wrote:
 >
 > The following reply was made to PR bin/55170; it has been noted by GNATS.
 >
 > From: Robert Elz <kre%munnari.OZ.AU@localhost>
 > To: gnats-bugs%netbsd.org@localhost
 > Cc:
 > Subject: Re: bin/55170 dhcpcd fails when used instead of rtsol
 > Date: Wed, 15 Apr 2020 11:53:35 +0700
 >
 >      Date:        Tue, 14 Apr 2020 11:10:02 +0000 (UTC)
 >      From:        Roy Marples <roy%marples.name@localhost>
 >      Message-ID:  <20200414111002.4AFB31A924B%mollari.NetBSD.org@localhost>
 >
 >  Roy:
 >
 >    |  This patch should fix both the quiestness and the error.
 >    |  There is no need to create the control socket in test mode.
 >
 >  The one thing that patch doesn't address, which it could, is the
 >  error message that is produced when (for whatever reason, which should
 >  no longer be this one) control_start() does fail.
 >
 >  It has two problems, first, to anyone but you,
 >
 >         main: control_start: ....
 >
 >  is meaningless, when I first saw that in the PR messages, I assumed
 >  that some program/script "control_start" had perhaps not been  installed,
 >  or not installed correctly.
 >
 >  Could it not say something more like
 >
 >         Unable to init control socket (main): ...
 >
 >  You don't need to see the "control_start" to know which function it
 >  was that failed, and to almost everyone else that's useless info,
 >  and the function that called it is secondary info (useful to know,
 >  but not vital).   If you want a standard form prefix it would be
 >
 >         dhcpcd: Unable to init control socket (main): ...
 >
 >
 >  And secondly, when control_start() detects an error, and is about to
 >  return failure, it does (something like)
 >
 >                 unlink(sock.sun_path);
 >                 close(fd);
 >                 return -1;
 >
 >  where if one of those sys calls fails (the unlink is certainly there,
 >  the close I am guessing at, don't remember, and did not look again)
 >  which is entirely possible, then errno gets modified - so instead of
 >  it reflecting the error from whatever sys call failed that led into
 >  this path, it instead indicates that the reason the unlink() failed,
 >  which no-one cares about.
 >
 >  That sequence needs an
 >
 >                 int err = errno;
 >
 >                 errno = err;
 >
 >  wrapper around it.
 >
 >  Without that, the part of the error message shown above as the elipsis
 >  is useless.
 >
 >  kre
 >
 >  ps: I'm assuming that Kimmo will test the patch and confirm it works.
 >
 >
 


Home | Main Index | Thread Index | Old Index