dhcpcd-discuss

results patch dhcp6.c, version 2

Peter Mattern

Sun May 25 11:56:32 2014

Sending the modified patch and an sdiff comparing the journal output of unpatched dhcpcd vs. the version patched with this modified patch.

Btw. in the attachments to my last post the lines
      DUID <IPv6 address>
were due to an error running sed, of course. Actual logs contained DUIDs, no IPv6 addresses.
Index: dhcp6.c
==================================================================
--- dhcp6.c
+++ dhcp6.c
@@ -2494,10 +2494,11 @@
 	sa.sin6_port = htons(DHCP6_CLIENT_PORT);
 #ifdef BSD
 	sa.sin6_len = sizeof(sa);
 #endif
 
+	fprintf(stderr, "0\n");
 	ctx = dctx->ipv6;
 #ifdef SOCK_CLOEXEC
 	ctx->dhcp_fd = socket(PF_INET6,
 	    SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK,
 	    IPPROTO_UDP);
@@ -2520,30 +2521,35 @@
 		ctx->dhcp_fd = -1;
 	        return -1;
 	}
 #endif
 
+	fprintf(stderr, "1\n");
 	n = 1;
 	if (setsockopt(ctx->dhcp_fd, SOL_SOCKET, SO_REUSEADDR,
 	    &n, sizeof(n)) == -1)
 		goto errexit;
 
+	fprintf(stderr, "2\n");
 	n = 1;
 	if (setsockopt(ctx->dhcp_fd, SOL_SOCKET, SO_BROADCAST,
 	    &n, sizeof(n)) == -1)
 		goto errexit;
 
+	fprintf(stderr, "3\n");
 #ifdef SO_REUSEPORT
 	n = 1;
 	if (setsockopt(ctx->dhcp_fd, SOL_SOCKET, SO_REUSEPORT,
 	    &n, sizeof(n)) == -1)
 		goto errexit;
 #endif
 
+	fprintf(stderr, "4\n");
 	if (bind(ctx->dhcp_fd, (struct sockaddr *)&sa, sizeof(sa)) == -1)
 		goto errexit;
 
+	fprintf(stderr, "5\n");
 	n = 1;
 	if (setsockopt(ctx->dhcp_fd, IPPROTO_IPV6, IPV6_RECVPKTINFO,
 	    &n, sizeof(n)) == -1)
 		goto errexit;
 

version 6.3.2 starting								version 6.3.2 starting
version 6.3.2 starting								version 6.3.2 starting
eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' PREINIT			eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' PREINIT			eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' CARRIER			eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' CARRIER			eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
DUID <DUID>									DUID <DUID>
eth0: IAID <IAID>								eth0: IAID <IAID>
eth0: soliciting an IPv6 router							eth0: soliciting an IPv6 router
eth0: sending Router Solicitation						eth0: sending Router Solicitation
DUID <DUID>									DUID <DUID>
eth0: IAID <IAID>								eth0: IAID <IAID>
eth0: soliciting an IPv6 router							eth0: soliciting an IPv6 router
eth0: sending Router Solicitation						eth0: sending Router Solicitation
eth0: reading lease `/var/lib/dhcpcd/dhcpcd-eth0.lease'				eth0: reading lease `/var/lib/dhcpcd/dhcpcd-eth0.lease'
eth0: reading lease `/var/lib/dhcpcd/dhcpcd-eth0.lease'			  <
eth0: rebinding lease of <local IPv4 address>					eth0: rebinding lease of <local IPv4 address>
eth0: sending REQUEST (xid 0x528f809c), next in 3.2 seconds		  |	eth0: sending REQUEST (xid 0xf4b056f3), next in 4.1 seconds
eth0: Router Advertisement from <Link Local Unicast address upstream r		eth0: Router Advertisement from <Link Local Unicast address upstream r
eth0: adding address <Global Unicast address>/64				eth0: adding address <Global Unicast address>/64
eth0: vltime 7200 seconds, pltime 1005 seconds				  |	eth0: vltime 7200 seconds, pltime 1137 seconds
eth0: waiting for Router Advertisement DAD to complete				eth0: waiting for Router Advertisement DAD to complete
dhcp6_start: eth0: Protocol not available					dhcp6_start: eth0: Protocol not available
eth0: acknowledged <local IPv4 address> from <IPv4 address upstream ro		eth0: acknowledged <local IPv4 address> from <IPv4 address upstream ro
									  >	eth0: reading lease `/var/lib/dhcpcd/dhcpcd-eth0.lease'
eth0: rebinding lease of <local IPv4 address>					eth0: rebinding lease of <local IPv4 address>
eth0: sending REQUEST (xid 0x528f809c), next in 3.2 seconds		  |	eth0: sending REQUEST (xid 0xf4b056f3), next in 4.1 seconds
eth0: Router Advertisement from <Link Local Unicast address upstream r		eth0: Router Advertisement from <Link Local Unicast address upstream r
eth0: adding address <Global Unicast address>/64				eth0: adding address <Global Unicast address>/64
eth0: vltime 7200 seconds, pltime 1005 seconds				  |	eth0: vltime 7200 seconds, pltime 1137 seconds
eth0: waiting for Router Advertisement DAD to complete				eth0: waiting for Router Advertisement DAD to complete
									  >	0
									  >	1
									  >	2
									  >	3
dhcp6_start: eth0: Protocol not available					dhcp6_start: eth0: Protocol not available
eth0: acknowledged <local IPv4 address> from <IPv4 address upstream ro		eth0: acknowledged <local IPv4 address> from <IPv4 address upstream ro
eth0: checking for <local IPv4 address>						eth0: checking for <local IPv4 address>
eth0: checking for <local IPv4 address>						eth0: checking for <local IPv4 address>
eth0: sending ARP probe (1 of 3), next in 1.9 seconds			  |	eth0: sending ARP probe (1 of 3), next in 1.2 seconds
eth0: sending ARP probe (1 of 3), next in 1.9 seconds			  |	eth0: sending ARP probe (1 of 3), next in 1.2 seconds
									  >	eth0: sending ARP probe (2 of 3), next in 1.8 seconds
									  >	eth0: sending ARP probe (2 of 3), next in 1.8 seconds
eth0: Router Advertisement DAD completed					eth0: Router Advertisement DAD completed
eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' ROUTERADVERT		  <
eth0: Router Advertisement DAD completed					eth0: Router Advertisement DAD completed
eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' ROUTERADVERT			eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' ROUTERADVERT
eth0: sending ARP probe (2 of 3), next in 1.3 seconds			  |	eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' ROUTERADVERT
eth0: sending ARP probe (2 of 3), next in 1.3 seconds			  <
eth0: sending ARP probe (3 of 3), next in 2.0 seconds				eth0: sending ARP probe (3 of 3), next in 2.0 seconds
eth0: sending ARP probe (3 of 3), next in 2.0 seconds				eth0: sending ARP probe (3 of 3), next in 2.0 seconds
eth0: leased <local IPv4 address> for 864000 seconds				eth0: leased <local IPv4 address> for 864000 seconds
eth0: leased <local IPv4 address> for 864000 seconds				eth0: leased <local IPv4 address> for 864000 seconds
eth0: renew in 432000 seconds, rebind in 756000 seconds				eth0: renew in 432000 seconds, rebind in 756000 seconds
eth0: adding IP address <local IPv4 address>/24					eth0: adding IP address <local IPv4 address>/24
eth0: adding route to <IPv4 network address>/24					eth0: adding route to <IPv4 network address>/24
eth0: adding default route via <IPv4 address upstream router>			eth0: adding default route via <IPv4 address upstream router>
eth0: writing lease `/var/lib/dhcpcd/dhcpcd-eth0.lease'				eth0: writing lease `/var/lib/dhcpcd/dhcpcd-eth0.lease'
eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' BOUND			eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' BOUND
eth0: renew in 432000 seconds, rebind in 756000 seconds				eth0: renew in 432000 seconds, rebind in 756000 seconds
eth0: adding IP address <local IPv4 address>/24					eth0: adding IP address <local IPv4 address>/24
eth0: adding route to <IPv4 network address>/24					eth0: adding route to <IPv4 network address>/24
eth0: adding default route via <IPv4 address upstream router>			eth0: adding default route via <IPv4 address upstream router>
eth0: writing lease `/var/lib/dhcpcd/dhcpcd-eth0.lease'				eth0: writing lease `/var/lib/dhcpcd/dhcpcd-eth0.lease'
eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' BOUND			eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' BOUND
forking to background								forking to background
forked to background, child pid <PID>						forked to background, child pid <PID>
forking to background								forking to background
forked to background, child pid <PID>						forked to background, child pid <PID>
dhcpcd[<PID>]: eth0: sending ARP announce (1 of 2), next in 2.0 second		dhcpcd[<PID>]: eth0: sending ARP announce (1 of 2), next in 2.0 second
systemd[1]: Started dhcpcd auf eth0.						systemd[1]: Started dhcpcd auf eth0.
dhcpcd[<PID>]: eth0: sending ARP announce (2 of 2)				dhcpcd[<PID>]: eth0: sending ARP announce (2 of 2)

Follow-Ups:
Re: results patch dhcp6.c, version 2Roy Marples
References:
meaning of an error message related to DHCPv6Peter Mattern
Re: meaning of an error message related to DHCPv6Roy Marples
results after patching dhcp6.cPeter Mattern
Re: results after patching dhcp6.cRoy Marples
Archive administrator: postmaster@marples.name