Bug 270683 - net/mDNSResponder: ipv6 broken with 1790.80.10
Summary: net/mDNSResponder: ipv6 broken with 1790.80.10
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-07 08:42 UTC by Matthieu Volat
Modified: 2023-04-09 14:00 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
Fix issues with IPV6_RECVPKTINFO, IPV6_RECVHOPLIMIT and SO_REUSEADDR (2.14 KB, patch)
2023-04-07 08:42 UTC, Matthieu Volat
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Volat 2023-04-07 08:42:56 UTC
Created attachment 241336 [details]
Fix issues with IPV6_RECVPKTINFO, IPV6_RECVHOPLIMIT and SO_REUSEADDR

Hi,

I'm not sure why, but the patches regarding IPV6_RECVPKTINFO, IPV6_RECVHOPLIMIT and SO_REUSEADDR were dropped in the last net/mDNSResponder update, breaking mdnsd in a ipv6-enabled setup at least on freebsd 13.2-RC6, presumably also for the whole 13.x and bellow versions:

# mdnsd -debug
Default: mDNSResponder (Engineering Build) (Apr  7 2023 10:37:48) starting
setsockopt - IPV6_PKTINFO: Invalid argument
Default: Unable to parse DNS server list. Unicast DNS-SD unavailable
Default: mDNSResponder (Engineering Build) (Apr  7 2023 10:37:48) stopping

Would you consider reintroducing the patches to mDNSPosix/mDNSPosix.c ?

Regards,

-- Mazhe
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-04-08 17:41:59 UTC
Same here, it doesn't start up:

% sudo /usr/local/sbin/mdnsd -debug
Default: mDNSResponder (Engineering Build) (Apr  7 2023 07:31:13) starting
setsockopt - IPV6_PKTINFO: Invalid argument
Default: mDNSResponder (Engineering Build) (Apr  7 2023 07:31:13) stopping

I'll try your patches.
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2023-04-08 17:49:57 UTC
Yep, your patch works :)
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-04-09 13:45:36 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=440c2c6a26303e1a1db6e5f5de039d64bac4ff3a

commit 440c2c6a26303e1a1db6e5f5de039d64bac4ff3a
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-04-09 13:30:08 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-04-09 13:36:36 +0000

    net/mDNSResponder: Fix build in IPv6 environment

    - Restore patch-mDNSPosix-mDNSPosix.c which was removed by accident in 1790.80.10 update
    - Bump PORTREVISION for package change

    PR:             270683, 270689
    Reported by:    Matthieu Volat <mazhe@alkumuna.eu>, <dougs@dawnsign.com>

 net/mDNSResponder/Makefile                         |  1 +
 .../files/patch-mDNSPosix-mDNSPosix.c (new)        | 38 ++++++++++++++++++++++
 2 files changed, 39 insertions(+)
Comment 4 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-04-09 14:00:59 UTC
Committed. Thanks!