Bug#1035395: wide-dhcpv6-client does not recover if the network layer becomes unready.

2024-06-13 Thread D Shiels
I was being annoyed by this bug today. It doesn’t happen often but I suspect 
when patching the ppp daemon or ISP changes the ppp interface gets a new ID.

strace -p 294339
strace: Process 294339 attached
select(7, [4 6], NULL, NULL, {tv_sec=92, tv_usec=146932}) = 0 (Timeout)
sendto(4, “X"..., 48, 0, {sa_family=AF_INET6, sin6_port=htons(547), 
sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "ff02::1:2", _addr), 
sin6_scope_id=13}, 28) = -1 ENETUNREACH (Network is unreachable)
getpid()= 294339
sendto(3, "<27>Jun 13 16:15:53 dhcp6c[29433"..., 89, MSG_NOSIGNAL, NULL, 0) = 89
select(7, [4 6], NULL, NULL, {tv_sec=117, tv_usec=240413}^Cstrace: Process 
294339 detached
 


I’m not 100% sure but if the sin6_scope_id=13 matched the same ID returned by 
"ip a” it has definitely changed.

My current thought is when the error occurs to assume a linked problem and try 
an ifreset(ifp) then retry the block: 

dst.sin6_scope_id = ifp->linkid;

if (sendto(sock, buf, len, 0, (struct sockaddr *),
sysdep_sa_len((struct sockaddr *))) == -1) {
debug_printf(LOG_ERR, FNAME,
"transmit failed: %s", strerror(errno));
goto end;
}


My first task is to try and reproduce when the family won’t notice. Play for 
this weekend maybe.

Bug#1035395: wide-dhcpv6-client does not recover if the network layer becomes unready.

2023-05-02 Thread Phil Leinster
Package: wide-dhcpv6-client
Version: 20080615-23
Severity: important
Tags: ipv6
X-Debbugs-Cc: philleins...@gmail.com

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   If the network layer becomes unready, or the service starts before
   the network interface is ready, the service fails to operate on that
   interface. The following message is logged "client6_send: transmit
   failed: Network is unreachable"
   * What exactly did you do (or not do) that was effective (or
 ineffective)?
 Normal network activity. PPP interfaces are particularly affected
 due to their non-permanent status.
   * What was the outcome of this action?
 IPv6 address was not requested and the lease lapsed after the
 timeout.
   * What outcome did you expect instead?
 Standard IPv6 connectivity without interruption.
 This issue can be worked around with a restart of the service.

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: 11.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-21-amd64 (SMP w/4 CPU threads)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages wide-dhcpv6-client depends on:
ii  debconf [debconf-2.0]  1.5.77
ii  init-system-helpers1.60
ii  libc6  2.31-13+deb11u6
ii  libfl2 2.6.4-8
ii  lsb-base   11.1.0
ii  sharutils  1:4.15.2-5

wide-dhcpv6-client recommends no packages.

wide-dhcpv6-client suggests no packages.

-- Configuration Files:
/etc/wide-dhcpv6/dhcp6c.conf changed:
profile default
{
  information-only;
  request domain-name-servers;
  request domain-name;
  script "/etc/wide-dhcpv6/dhcp6c-script";
};
interface ppp0 {
#prefix ::/56 3600;
# Request Prefix Delegation on ppp0, and give the received prefix id 2
send ia-pd 2;
#send ia-na 1;
};
id-assoc pd 2 {
prefix-interface ppp0 {
sla-len 8; # <- IMPORTANT: 8 because our small net is 64 and our 
big is 56 and that is the difference
sla-id 0;  # This is the subnet assigned within the SLA
ifid 1;# This is the host portion of the address
};
prefix-interface enp1s0 {
# Assign subnet 1 to enp1s0
sla-len 8; # <- IMPORTANT: 8 because our small net is 64 and our 
big is 56 and that is the difference
sla-id 1;
ifid 1;
};
prefix-interface enp1s0.16 {
# Assign subnet 1 to enp1s0
sla-len 8; # <- IMPORTANT: 8 because our small net is 64 and our 
big is 56 and that is the difference
sla-id 2;
ifid 1;
};
};


-- debconf information:
* wide-dhcpv6-client/interfaces: enp3s0