From nobody Sun Aug 6 06:38:14 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RJVCG1yfrz4mWBT for ; Sun, 6 Aug 2023 06:38:34 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RJVCD2qxwz4gB3; Sun, 6 Aug 2023 06:38:32 +0000 (UTC) (envelope-from kob6558@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb2a.google.com with SMTP id 3f1490d57ef6-c4cb4919bb9so3846760276.3; Sat, 05 Aug 2023 23:38:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691303911; x=1691908711; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fFDC9DGzkOHVWUKSykql9P6cwYw3juOXSmKX7IilfhM=; b=XRoBcrdfJbvydij2IXzKKZSE9p4ctLgp1CwLf5Tp51riwUUBKNnjBmKv83CZguz3+A B4gsgjCjDoEaZ2A5qMPJKhfH1dLsLq4TCoGmKZGXdK0Zyee4dGYfE+X4VUadnbwsUo/8 JXpVoh5Lx+ql/c5iJOlJE6vVvJmJPSponXu1J7wm3GVhdgkeFMPdpEfIubVf79W+bJBm 25dwRGHGjxgYVANKDTuklejMFe34V8AhIShc8g4w9ImzidP1PKqQRZNFh2ed8vu5cP7p 7cUC2ZQEzM64R6yecFs0r3l5zvIrGxz347TMNFtlHyb5frZOvWT/97a3oeHR9yZZmn+0 JNgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691303911; x=1691908711; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fFDC9DGzkOHVWUKSykql9P6cwYw3juOXSmKX7IilfhM=; b=kyDK+L6XVeGTGi6TYgVnro1GOK8CAOPWZ2mLyh2HFu1gL4+t/1wWURFFVa8SceOEtA Zx5DyXFFcpGbaWsyyuBgN1gft5rgEFuFjyiGOfiSlSIkW+yPrdB3O2GWC/W0tUEjSfnp 41DQhe1iFOzXAaJus5CgX/LHfTFWjJBEAWnyIp5tkrEsRL9ptocurZR182TLPgaA2jgK EehP/NdabNgSXBDBSJrkYhTm59lzXVsoJN2wcdB+HZ7dIeFs+LgW39dxTDUIL41ovo/1 c0ZJzYbqoWcyp281MuDi51OUe6zIYiWhU1bdR9jh3hhaa4o3tpI0SDCzavuD42oswlTb ZwMw== X-Gm-Message-State: AOJu0YzLr8XlKsOjsGDTn8gPQvhhR9r8b85ufXCX5xGGnb4EhYIqq9gW IUKUppOr3FlePR0pIdOGie9aKl9YNvA02mEuMHGyn/7+ X-Google-Smtp-Source: AGHT+IEnbta6g/RlcQZp+N1dXdqeTiowdEdgdpTkMqW4kFZZNe6+GCdqsEsqwio95yXGq4YX94gRQuo2jZgWLxIQTLE= X-Received: by 2002:a05:6902:4c4:b0:cfe:9981:2af3 with SMTP id v4-20020a05690204c400b00cfe99812af3mr5535915ybs.20.1691303910726; Sat, 05 Aug 2023 23:38:30 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <62d300c8-2c3e-58fa-334e-23a17962279a@freebsd.org> <753f3990-9903-3718-445c-49fc01f960a7@freebsd.org> In-Reply-To: <753f3990-9903-3718-445c-49fc01f960a7@freebsd.org> From: Kevin Oberman Date: Sat, 5 Aug 2023 23:38:14 -0700 Message-ID: Subject: Re: Fwd: Unreliability with DHCP To: Graham Perrin Cc: freebsd-current@freebsd.org Content-Type: multipart/alternative; boundary="000000000000ce5edb06023b6008" X-Rspamd-Queue-Id: 4RJVCD2qxwz4gB3 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] --000000000000ce5edb06023b6008 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Aug 5, 2023 at 3:16=E2=80=AFPM Graham Perrin wrote: > On 05/08/2023 12:39, Oleksandr Kryvulia wrote: > > 04.08.23 19:07, Graham Perrin =D0=BF=D0=B8=D1=88=D0=B5: > >> > >> Can anyone from freebsd-net@ help? > >> > >> > >> -------- Forwarded Message -------- > >> Subject: Unreliability with DHCP > >> Date: Sun, 30 Jul 2023 16:17:43 +0100 > >> From: Graham Perrin > >> Organisation: FreeBSD > >> To: FreeBSD CURRENT > >> > >> > >> > >> 1. Sleep (suspend) whilst connected to one network > >> > >> 2. connect to a network elsewhere > >> > >> 3. wake (resume). > >> > >> Result: > >> > >> /etc/resolv.conf frequently contains outdated information. In some > >> (maybe all) such cases, the IPv4 inet address is outdated; and so on. > >> > >> Which /etc/rc.d/ file(s) should I attempt to fix? > >> > >> I imagine using the resume keyword, which is currently used by only > >> one script: > >> > >> % rcorder -k resume /etc/rc.d/* > >> /etc/rc.d/ntpd > >> % > >> > >> > >> I routinely run the command below to work around the bug (and observe > >> the states of things) =E2=80=93 run _after_ the bug bites. I'd prefer = a fix, > >> to prevent the bites. > >> > >> ls /var/run/resolvconf/interfaces/ ; route delete default ; ifconfig > >> wlan0 down && ifconfig em0 down && sleep 5 ; ls > >> /var/run/resolvconf/interfaces/ ; ifconfig em0 up && sleep 15 > >> ; ls /var/run/resolvconf/interfaces/ ; cat /etc/resolv.conf ; ping -c > >> 2 -4 freshports.org > >> > > > > > > As dirty workaround I have in my /etc/rc.resume > > > > service netif restart > > service routing restart > > > Thanks, I'll try when I'm next on campus. > > I do know that 'service routing restart' can be problematic. Please, > see, for example, ; I had something > similar a few minutes ago. > My usual solution is "service netif restart wlan0" (or the interface you are using). It should restart the interface, if rc.conf calls for it, dhcpclient and wpa_supplicant (if appropriate). --=20 Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 --000000000000ce5edb06023b6008 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Aug 5, 2023 at 3:16=E2= =80=AFPM Graham Perrin <grah= amperrin@freebsd.org> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">On 05/08/2023 12:39, Oleks= andr Kryvulia wrote:
> 04.08.23 19:07, Graham Perrin =D0=BF=D0=B8=D1=88=D0=B5:
>>
>> Can anyone from freebsd-net@ help?
>>
>>
>> -------- Forwarded Message --------
>> Subject:=C2=A0=C2=A0=C2=A0=C2=A0 Unreliability with DHCP
>> Date:=C2=A0=C2=A0=C2=A0=C2=A0 Sun, 30 Jul 2023 16:17:43 +0100
>> From:=C2=A0=C2=A0=C2=A0=C2=A0 Graham Perrin <grahamperrin@freebsd.org>= ;
>> Organisation:=C2=A0=C2=A0=C2=A0=C2=A0 FreeBSD
>> To:=C2=A0=C2=A0=C2=A0=C2=A0 FreeBSD CURRENT <freebsd-current@freebsd.org<= /a>>
>>
>>
>>
>> 1. Sleep (suspend) whilst connected to one network
>>
>> 2. connect to a network elsewhere
>>
>> 3. wake (resume).
>>
>> Result:
>>
>> /etc/resolv.conf frequently contains outdated information. In some=
>> (maybe all) such cases, the IPv4 inet address is outdated; and so = on.
>>
>> Which /etc/rc.d/ file(s) should I attempt to fix?
>>
>> I imagine using the resume keyword, which is currently used by onl= y
>> one script:
>>
>> % rcorder -k resume /etc/rc.d/*
>> /etc/rc.d/ntpd
>> %
>>
>>
>> I routinely run the command below to work around the bug (and obse= rve
>> the states of things) =E2=80=93 run _after_ the bug bites. I'd= prefer a fix,
>> to prevent the bites.
>>
>> ls /var/run/resolvconf/interfaces/ ; route delete default ; ifconf= ig
>> wlan0 down && ifconfig em0 down && sleep 5 ; ls >> /var/run/resolvconf/interfaces/ ; ifconfig em0 up && sleep= 15
>> ; ls /var/run/resolvconf/interfaces/ ; cat /etc/resolv.conf ; ping= -c
>> 2 -4
freshports.org
>>
>
>
> As dirty workaround I have in my /etc/rc.resume
>
> service netif restart
> service routing restart


Thanks, I'll try when I'm next on campus.

I do know that 'service routing restart' can be problematic. Please= ,
see, for example, <https://pastebin.com/raw/mXmVPruq>; I = had something
similar a few minutes ago.

My usual solution is "service netif restart wlan0&quo= t; (or the interface you are using). It should restart the interface, if rc= .conf calls for it, dhcpclient and wpa_supplicant (if appropriate). =
--
Kevin Oberman, Part time kid h= erder and retired Network Engineer
E-mail: rkoberman@gmail.com
PGP Finge= rprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
--000000000000ce5edb06023b6008--