From nobody Sun Aug 06 16:05:59 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 4RJkp54Yzyz4TxPx for ; Sun, 6 Aug 2023 16:06:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (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 4RJkp51rkHz3W6j for ; Sun, 6 Aug 2023 16:06:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-51a52a7d859so10177440a12.0 for ; Sun, 06 Aug 2023 09:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1691337963; x=1691942763; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hLJwVpxtS1k0WHYjpRcnmmYXvsHokp98uQlMK9Hd9gY=; b=BJzBzGPWMHYLO1APRHSb4YMbsg5M9rCrmJV1gIbSssU12ddnVvOlKi/yECsOJjqsB8 YYoPryGnJoVSdKKFFL4REkJVMQCW7Ysyx82urTF9IYBJgK0+pGjGoFH1/GDc56HrGY/x 4AoaTLMRvgD1VhdEv3ZoAYncPifjQB0i8lup1chwcOqW4BM3QZUy2CfSRF2t/ug/Qq4z Y02fBTLpntPOyPdkVzDl1sFStJMJTDFQvn4EKWmlNhyJgbbOPR4/kx8Q5EqCcl00ivf4 Z8QSzv04or1osWTL2KXvc8f+8WwkLDf4Vt9+eEmblsAvKXTRuZipC0+1LD4RE04RQC3E eutQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691337963; x=1691942763; 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=hLJwVpxtS1k0WHYjpRcnmmYXvsHokp98uQlMK9Hd9gY=; b=ggsopWi3Ai9hBwsyEd8vMKNO+QtjAaMXUDL0TFqXMpuneNlvx8rdJ5s4sqe90H6eeX yulriSGXzB2tehRiEACDE3NVPe/rQ3g2Z6qbWyEo9Mk+Ca+qOVv/P0faGZN/SCCR9n2j 5GypnW/zPjMHU6UvcDn9pChYVM8vB7uBfkD8Xuh/rnBvz3xhYrh/Y4cPJG87aOZuDDtB 6WMD5EtpENKLrywtuTNnjICcawfKHS1G/8rOjK/ezszO/3Rpjy5F3644EM9YLSCd3bNG wLtuIkfB3TEFlgQfXIA1n3M+jjkHLm8DuHDsrXWryIi2uIYPXrmy8WpQbknQA9AlY64P zSxA== X-Gm-Message-State: AOJu0YzO1fcnS/8HP42cGlu1U+hvlBb2s7gFC+RiljSc5bkyD2XGp+f3 1wwKDfWW9OwzVXAghv//96OH5VU8tJ1c/xp+1jcagmxZ6w1FPatn+gY= X-Google-Smtp-Source: AGHT+IEIWjHV5/4niq0072tW9AKnzVHU1n6OTlLZg/pWi4LVVJzMvICxdjFYH0yvxy9t7uraqZbhcJRWD9FIPa+lHgE= X-Received: by 2002:a05:6402:268b:b0:522:4e49:4e45 with SMTP id w11-20020a056402268b00b005224e494e45mr6186143edd.0.1691337963634; Sun, 06 Aug 2023 09:06:03 -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: From: Warner Losh Date: Sun, 6 Aug 2023 10:05:59 -0600 Message-ID: Subject: Re: Fwd: Unreliability with DHCP To: Kevin Oberman Cc: Graham Perrin , freebsd-current@freebsd.org Content-Type: multipart/alternative; boundary="00000000000084976b0602434e6f" X-Rspamd-Queue-Id: 4RJkp51rkHz3W6j 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:2a00:1450::/32, country:US] --00000000000084976b0602434e6f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Aug 6, 2023 at 12:38=E2=80=AFAM Kevin Oberman = wrote: > 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). > I'll have to remember that. I've been removing and reinsterting my usb dongle when when dhclient fails. I'd like to move to the internal wlan card, but the driver support has some show-stopper issues with suspend/resume for me more basic than dhclient... However, once those are resolved, I'd need a way to workaround the dhclient bug. Anybody have a clue why this is needed? Warner --00000000000084976b0602434e6f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sun, Aug 6, 2023 at 12:38=E2=80=AF= AM Kevin Oberman <rkoberman@gmail= .com> wrote:
On Sat, Aug 5, 2023 at 3:16=E2=80=AFPM Graham Perri= n <grahamp= errin@freebsd.org> wrote:
On 05/08/2023 12:39, Oleksand= r 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). =

I'll have to rem= ember that. I've been removing and reinsterting my usb dongle when when= dhclient fails.
I'd like to move to the internal wlan card, = but the driver support has some show-stopper issues with
suspend/= resume for me more basic than dhclient... However, once those are resolved,= I'd need a way to
workaround the dhclient bug.
Anybody have a clue why this is needed?

Warner
--00000000000084976b0602434e6f--