New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 862189 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Fuchsia
Pri: 1
Type: Bug



Sign in to add a comment

Migrate net::UDPSocket multicast implementation off of IOCTL_NETC_GET_IF_INFO

Project Member Reported by w...@chromium.org, Jul 10

Issue description

Under OS_FUCHSIA the net::UDPSocket implementation uses the ioctl to get the IPv4 address associated with the desired multicast interface, since that is the identifier required by the POSIX socket emulation of multicast.

We should migrate the net::UDPSocket off the ioctl-based interface querying, to use the NetworkChangeNotifier and/or GetNetworkList() impls, which build on Netstack::GetInterfaces().

As part of this, APIs like GetNetworkList() should be cleaned-up, e.g. GetNetworkList() returns a NetworkInterfaceList, each of which includes an |interface_index|, with the undocumented convention that the indexes reflect the position in that list.  Under Fuchsia, for example, it would make more sense to use the platform |id| for the interface as that index, since it can be used directly to look up details of the corresponding interface, rather than adding arbitrary indirection.
 
Labels: -Pri-2 Pri-1
Owner: w...@chromium.org
Status: Assigned (was: Untriaged)
Bumping priority, since this blocks removal of some private kernel headers from the SDK, and of the network-interfaces ioctl shim.
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0e901314fae385573302c2a8ccf6815c437dc900

commit 0e901314fae385573302c2a8ccf6815c437dc900
Author: Wez <wez@chromium.org>
Date: Thu Jul 12 22:09:01 2018

Enable Chromium mDNS implementation to be built under Fuchsia.

Bug:  862189 
Change-Id: Ia98189e83a91a4be53a4b31744a90057dc64cd3c
Reviewed-on: https://chromium-review.googlesource.com/1135571
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Asanka Herath <asanka@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574746}
[modify] https://crrev.com/0e901314fae385573302c2a8ccf6815c437dc900/net/features.gni

Project Member

Comment 3 by bugdroid1@chromium.org, Jul 13

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5283d5830e1158fff1f8e910f6bff1365faf78a1

commit 5283d5830e1158fff1f8e910f6bff1365faf78a1
Author: Wez <wez@chromium.org>
Date: Fri Jul 13 16:36:08 2018

Initialize ip_mreq structs in UDPSocket::JoinGroup() and friends.

This ensures deterministic failure if the setsockopt() implementation
tries to make use of otherwise uninitialized fields.

Bug:  862189 
Change-Id: I0be1dd6c9b830babf0911dc0d78910a20cbd0813
Reviewed-on: https://chromium-review.googlesource.com/1136374
Reviewed-by: Asanka Herath <asanka@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574943}
[modify] https://crrev.com/5283d5830e1158fff1f8e910f6bff1365faf78a1/net/socket/udp_socket_posix.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 13

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9538439a24e47d3ceecfdb0a13b4b34bf8dd5718

commit 9538439a24e47d3ceecfdb0a13b4b34bf8dd5718
Author: Wez <wez@chromium.org>
Date: Fri Jul 13 22:57:38 2018

Set interface to bind for multicast using index rather than address.

Previously Fuchsia required IPv4 multicast binding to specify the
desired interface by its IP address, requiring an extra step to look up
the address based on the interface index.

Fuchsia's netstack now supports binding using the interface Id directly,
which is what we use on all other platforms than MacOS, so switch to
using that version of the API.

Bug:  862189 
Change-Id: Idecc66cb1d6e7bbe0ab1061dbb96c12114cac9dc
Reviewed-on: https://chromium-review.googlesource.com/1136390
Reviewed-by: Asanka Herath <asanka@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575104}
[modify] https://crrev.com/9538439a24e47d3ceecfdb0a13b4b34bf8dd5718/net/base/network_interfaces_unittest.cc
[modify] https://crrev.com/9538439a24e47d3ceecfdb0a13b4b34bf8dd5718/net/socket/udp_socket_posix.cc
[modify] https://crrev.com/9538439a24e47d3ceecfdb0a13b4b34bf8dd5718/net/socket/udp_socket_unittest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment