New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LinuxNetworkInterface.GetLinuxNetworkInterfaces - An invalid IP address was specified. #49515
Comments
Tagging subscribers to this area: @dotnet/ncl Issue Details.NET 5 Got this error reported today: jellyfin/jellyfin#5454
He's posted the network settings on his device as
Code starts at https://github.com/jellyfin/jellyfin/blob/8615847a8aba1f504b184e79907e6885215ffdaa/Jellyfin.Networking/Manager/NetworkManager.cs#L1051 Any ideas?
|
I don't see anything suspicious in the output. I look at the IPAddress() ctor and it would throw ArgumentException only if the address length is neither IPv4 nor IPv6. Matching PAL code uses only those two constant. So that is curious. I think the way to debug would be creating simple self-contained app that only gets the interfaces and step through in debugger. Since this is ARM, I'm wondering if there is alignment issue... |
@BaronGreenback can you please try to debug it? If we know the root cause (e.g. alignment as @wfurt suggested above), we can help with a fix. |
The error isn't produced on my kit - it's a bug report from one of our users. - I'll put something together for him - based on the original dotnet source to see if i can get some output. |
Just updating - wrote some code for the user, that outputs the info it's receiving from [DllImport("libSystem.Native", EntryPoint = "SystemNative_GetNetworkInterfaces")]
public static unsafe extern int GetNetworkInterfaces(ref int count, ref NetworkInterfaceInfo* addrs, ref int addressCount, ref IpAddressInfo* aa); It looks like its getting all zero's for the address. Have modified the test code again - and asked for it to be re-run. Will let you know the outcome. |
thanks for update. Is |
It's come back with 4 interfaces. There are 5 on the system , but i don't know if the last one would have an entry. lo: 1 IPv4, 1 IPv6 |
ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 |
Ok this is the info returned from [DllImport("libSystem.Native", EntryPoint = "SystemNative_GetNetworkInterfaces")]
public static unsafe extern int GetNetworkInterfaces(ref int count, ref NetworkInterfaceInfo* addrs, ref int addressCount, ref IpAddressInfo* aa); Name: lo Name: eth0 Name: eth1 Name: dns Error parsing IP Error parsing IP 192.168.109.50 192.168.109.51 192.168.109.52 192.168.109.53 ::1 fe80::6662:66ff:fed0:5ac Code used to get these result is at https://github.com/BaronGreenback/TestRepo |
do you know how the And no, the Java bug is not relevant as we no longer read and parse /proc entries. |
From the user _I've configured the network via systemd-networkd: cat /etc/systemd/network/eth0.network [Match] [Network] [Address] [Address] [Address] [Address] Also there's no "new and old naming". enp3s0 is a Predictable Network Interface Name while eth0 isn't. If the network cards don't change in the device, there's no need to use predictable network interface names. brctl show gives an empty output, because there's no bridge configured._ |
"Predictable Network Interface Name " -> that what I call new. (I know it is around for a while now) When I add secondary/alias address to interface via Any chance you have similar setup on x64 and/or you know how to mimic it with ip utility @BaronGreenback. |
This issue has been automatically marked Please refer to our contribution guidelines for tips on what information might be required. |
This issue will now be closed since it had been marked |
.NET 5
Got this error reported today: jellyfin/jellyfin#5454
He's posted the network settings on his device as
Code starts at https://github.com/jellyfin/jellyfin/blob/8615847a8aba1f504b184e79907e6885215ffdaa/Jellyfin.Networking/Manager/NetworkManager.cs#L1051
Any ideas?
The text was updated successfully, but these errors were encountered: