This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] resolv: Enable full ICMP errors for UDP DNS sockets [BZ #24047]


On Thu, Mar 7, 2019 at 7:18 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Zack Weinberg:
>
> > On Thu, Mar 7, 2019 at 7:08 AM Zack Weinberg <zackw@panix.com> wrote:
> >>
> >> On Thu, Mar 7, 2019 at 6:21 AM Florian Weimer <fweimer@redhat.com> wrote:
> >> >
> >> > * Florian Weimer:
> >> >
> >> > > The Linux kernel suppresses some ICMP error messages by default for
> >> > > UDP sockets.  This commit enables full ICMP error reporting,
> >> > > hopefully resulting in faster failover to working name servers.
> >> ...
> >>
> >> The documentation makes it sound like IP_RECVERR doesn't do anything
> >> by itself, you need to call recvmsg(MSG_ERRQUEUE) to actually see the
> >> errors.  As far as I can tell, res_send.c doesn't do that, either
> >> before or after this patch.  Is the documentation wrong?
> >
> > er, by "the documentation" I am referring to the ip(7) manpage.
>
> Yes, the documentation is misleading.
>
> I believe the kernel code is in net/ipv4/raw.c in the raw_err function,
> which handles ICMP errors for UDP as well.  The harderr handling is
> bypassed if the socket has IP_RECVERR set.

I've now looked at this code for myself and I think you're right.  No
objection to the patch from me, then.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]