Open
Conversation
The __block qualifier is not used in Linux builds. Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
Moves functionality for cleaning the list of recent interfaces into its own subroutine. Upstream-Status: Submitted [dts@apple.com] Signed-off-by: Nate Karstens <nate.karstens@garmin.com> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Creates a subroutine for tearing down an interface. Upstream-Status: Submitted [dts@apple.com] Signed-off-by: Nate Karstens <nate.karstens@garmin.com> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Tracks the socket family associated with the interface. Upstream-Status: Submitted [dts@apple.com] Signed-off-by: Nate Karstens <nate.karstens@garmin.com> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Tells the mDNS core if an interface is a loopback interface, similar to AddInterfaceToList() in the MacOS implementation. Upstream-Status: Submitted [dts@apple.com] Signed-off-by: Nate Karstens <nate.karstens@garmin.com> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Emill
reviewed
Apr 25, 2023
Uses a linked list to store the index of changed network interfaces instead of a bitfield. This allows for network interfaces with an index greater than 31 (an index of 36 was seen on Android). Upstream-Status: Submitted [dts@apple.com] Signed-off-by: Nate Karstens <nate.karstens@garmin.com> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Change-Id: Ibeab0ec68ca0d21da8384d4362e59afd2951f138
The POSIX implementation currently clears all network interfaces
when netlink indicates that there has been a change. This causes
the following problems:
1) Applications are informed that all of the services they are
tracking have been removed.
2) Increases network load because the client must re-query for
all records it is interested in.
This changes netlink notification handling by:
1) Always comparing with the latest interface list returned
by the OS.
2) Confirming that the interface has been changed in a way
that we care about.
Upstream-Status: Submitted [dts@apple.com]
Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Netlink notification handling ignores messages for deleted links, RTM_DELLINK. It does handle RTM_GETLINK. According to libnl docu- mentation (http://www.infradead.org/~tgr/libnl/doc/route.html) RTM_DELLINK can be sent by the kernel, but RTM_GETLINK cannot. There was likely a mixup in the original implementation, so this change replaces handling for RTM_GETLINK with RTM_DELLINK. Testing and Verification Instructions: 1. Use ip-link to add and remove a VLAN interface and verify that mDNSResponder handles the deleted link. Upstream-Status: Submitted [dts@apple.com] Signed-off-by: Nate Karstens <nate.karstens@garmin.com> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Adds handling for socket() or read() returning a negative value (indicating an error has occurred). Upstream-Status: Submitted [dts@apple.com] Signed-off-by: Nate Karstens <nate.karstens@garmin.com> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
|
Nice fix |
0x4248
approved these changes
Jun 12, 2023
Closed
|
With this patchset applied, I get a I've made a fix and created a separate PR with the fix included (see #6). |
|
Can you help me understand what that means . I really have no idea? Is there something I can do?Sent from my iPhoneOn Jun 23, 2023, at 1:14 AM, Stefan Agner ***@***.***> wrote:
With this patchset applied, I get a SIGSEGV when there is a wpan0 interface on the same host.
Program received signal SIGSEGV, Segmentation fault.
InterfaceChangeCallback (fd=19, context=0x555555629e70) at mDNSPosix.c:1898
1898 ((*ifi)->ifa_addr->sa_family == AF_INET) &&
(gdb) bt
#0 InterfaceChangeCallback (fd=19, context=0x555555629e70) at mDNSPosix.c:1898
#1 0x000055555555c461 in mDNSPosixProcessFDSet (m=0x555555617d40 <mDNSStorage>, readfds=0x7fffffffde70, writefds=0x7fffffffdef0) at mDNSPosix.c:2499
#2 0x000055555555cbe2 in mDNSPosixRunEventLoopOnce (m=0x555555617d40 <mDNSStorage>, pTimeout=0x7fffffffdfc0, pSignalsReceived=0x7fffffffdfd0, pDataDispatched=0x7fffffffdfb7 "") at mDNSPosix.c:2700
#3 0x0000555555556b23 in MainLoop (m=0x555555617d40 <mDNSStorage>) at PosixDaemon.c:170
#4 0x0000555555556da5 in main (argc=2, argv=0x7fffffffe1a8) at PosixDaemon.c:220
(gdb) print (*ifi)->ifa_addr
$1 = (struct sockaddr *) 0x0
I've made a fix and created a separate PR with the fix included (see #6).
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
It seems that certain interface types may have `ifa_addr` set to null. Handle this case gracefully. Signed-off-by: Stefan Agner <stefan@agner.ch>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The attached patches fix some issues we noticed with the POSIX implementation:
Most of these changes have been available on OpenEmbedded for a while.