Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Aug 2023 10:05:59 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Kevin Oberman <rkoberman@gmail.com>
Cc:        Graham Perrin <grahamperrin@freebsd.org>, freebsd-current@freebsd.org
Subject:   Re: Fwd: Unreliability with DHCP
Message-ID:  <CANCZdfoXHkJi7AeBUZTOrnA6QDE0WQPC2ggnLCsbDRhyKV%2BjjQ@mail.gmail.com>
In-Reply-To: <CAN6yY1sSuOs_hRZBF1gCua3djfqJhLR5PiTX9Xro1YAY=Nfc8w@mail.gmail.com>
References:  <62d300c8-2c3e-58fa-334e-23a17962279a@freebsd.org> <e5e80c42-08c3-140b-b53b-a13ffbf01ff7@freebsd.org> <ceac6410-fcff-8020-ecee-e7953eb29078@shurik.kiev.ua> <753f3990-9903-3718-445c-49fc01f960a7@freebsd.org> <CAN6yY1sSuOs_hRZBF1gCua3djfqJhLR5PiTX9Xro1YAY=Nfc8w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--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 <rkoberman@gmail.com>=
 wrote:

> On Sat, Aug 5, 2023 at 3:16=E2=80=AFPM Graham Perrin <grahamperrin@freebs=
d.org>
> 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 <grahamperrin@freebsd.org>
>> >> Organisation:     FreeBSD
>> >> To:     FreeBSD CURRENT <freebsd-current@freebsd.org>
>> >>
>> >>
>> >>
>> >> 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, <https://pastebin.com/raw/mXmVPruq>; 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

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Sun, Aug 6, 2023 at 12:38=E2=80=AF=
AM Kevin Oberman &lt;<a href=3D"mailto:rkoberman@gmail.com">rkoberman@gmail=
.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1=
ex"><div dir=3D"ltr"><div dir=3D"ltr"><div style=3D"font-family:tahoma,sans=
-serif;font-size:small">On Sat, Aug 5, 2023 at 3:16=E2=80=AFPM Graham Perri=
n &lt;<a href=3D"mailto:grahamperrin@freebsd.org" target=3D"_blank">grahamp=
errin@freebsd.org</a>&gt; wrote:</div></div><div class=3D"gmail_quote"><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left=
:1px solid rgb(204,204,204);padding-left:1ex">On 05/08/2023 12:39, Oleksand=
r Kryvulia wrote:<br>
&gt; 04.08.23 19:07, Graham Perrin =D0=BF=D0=B8=D1=88=D0=B5:<br>
&gt;&gt;<br>
&gt;&gt; Can anyone from freebsd-net@ help?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; -------- Forwarded Message --------<br>
&gt;&gt; Subject:=C2=A0=C2=A0=C2=A0=C2=A0 Unreliability with DHCP<br>
&gt;&gt; Date:=C2=A0=C2=A0=C2=A0=C2=A0 Sun, 30 Jul 2023 16:17:43 +0100<br>
&gt;&gt; From:=C2=A0=C2=A0=C2=A0=C2=A0 Graham Perrin &lt;<a href=3D"mailto:=
grahamperrin@freebsd.org" target=3D"_blank">grahamperrin@freebsd.org</a>&gt=
;<br>
&gt;&gt; Organisation:=C2=A0=C2=A0=C2=A0=C2=A0 FreeBSD<br>
&gt;&gt; To:=C2=A0=C2=A0=C2=A0=C2=A0 FreeBSD CURRENT &lt;<a href=3D"mailto:=
freebsd-current@freebsd.org" target=3D"_blank">freebsd-current@freebsd.org<=
/a>&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; 1. Sleep (suspend) whilst connected to one network<br>
&gt;&gt;<br>
&gt;&gt; 2. connect to a network elsewhere<br>
&gt;&gt;<br>
&gt;&gt; 3. wake (resume).<br>
&gt;&gt;<br>
&gt;&gt; Result:<br>
&gt;&gt;<br>
&gt;&gt; /etc/resolv.conf frequently contains outdated information. In some=
 <br>
&gt;&gt; (maybe all) such cases, the IPv4 inet address is outdated; and so =
on.<br>
&gt;&gt;<br>
&gt;&gt; Which /etc/rc.d/ file(s) should I attempt to fix?<br>
&gt;&gt;<br>
&gt;&gt; I imagine using the resume keyword, which is currently used by onl=
y <br>
&gt;&gt; one script:<br>
&gt;&gt;<br>
&gt;&gt; % rcorder -k resume /etc/rc.d/*<br>
&gt;&gt; /etc/rc.d/ntpd<br>
&gt;&gt; %<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; I routinely run the command below to work around the bug (and obse=
rve <br>
&gt;&gt; the states of things) =E2=80=93 run _after_ the bug bites. I&#39;d=
 prefer a fix, <br>
&gt;&gt; to prevent the bites.<br>
&gt;&gt;<br>
&gt;&gt; ls /var/run/resolvconf/interfaces/ ; route delete default ; ifconf=
ig <br>
&gt;&gt; wlan0 down &amp;&amp; ifconfig em0 down &amp;&amp; sleep 5 ; ls <b=
r>
&gt;&gt; /var/run/resolvconf/interfaces/ ; ifconfig em0 up &amp;&amp; sleep=
 15<br>
&gt;&gt; ; ls /var/run/resolvconf/interfaces/ ; cat /etc/resolv.conf ; ping=
 -c <br>
&gt;&gt; 2 -4 <a href=3D"http://freshports.org" rel=3D"noreferrer" target=
=3D"_blank">freshports.org</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; As dirty workaround I have in my /etc/rc.resume<br>
&gt;<br>
&gt; service netif restart<br>
&gt; service routing restart<br>
<br>
<br>
Thanks, I&#39;ll try when I&#39;m next on campus.<br>
<br>
I do know that &#39;service routing restart&#39; can be problematic. Please=
, <br>
see, for example, &lt;<a href=3D"https://pastebin.com/raw/mXmVPruq" rel=3D"=
noreferrer" target=3D"_blank">https://pastebin.com/raw/mXmVPruq</a>&gt;; I =
had something <br>
similar a few minutes ago.<br></blockquote><div><span class=3D"gmail_defaul=
t" style=3D"font-family:tahoma,sans-serif;font-size:small"><br></span></div=
><div><span class=3D"gmail_default" style=3D"font-family:tahoma,sans-serif;=
font-size:small">My usual solution is &quot;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).</span> =
<br></div></div></div></blockquote><div><br></div><div>I&#39;ll have to rem=
ember that. I&#39;ve been removing and reinsterting my usb dongle when when=
 dhclient fails.</div><div>I&#39;d like to move to the internal wlan card, =
but the driver support has some show-stopper issues with</div><div>suspend/=
resume for me more basic than dhclient... However, once those are resolved,=
 I&#39;d need a way to</div><div>workaround the dhclient bug.</div><div><br=
></div><div>Anybody have a clue why this is needed?<br></div><div><br></div=
><div>Warner <br></div></div></div>

--00000000000084976b0602434e6f--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoXHkJi7AeBUZTOrnA6QDE0WQPC2ggnLCsbDRhyKV%2BjjQ>