From 52c3e9d51598a1a598a3d017d66549105609ab56 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 13 Mar 2023 11:19:11 -0400 Subject: [PATCH] Do not care about port, let kernel decide --- misc/getusbnicaddr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/getusbnicaddr b/misc/getusbnicaddr index dd5d77e4..206d7e64 100644 --- a/misc/getusbnicaddr +++ b/misc/getusbnicaddr @@ -10,7 +10,7 @@ def scan_nic(nicidx): s6 = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) s6.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 1) s6.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1) - s6.bind(('::', 1900)) + s6.bind(('::', 0)) msg = b'M-SEARCH * HTTP/1.1\r\nHOST: [ff02::c]:1900\r\nMAN: "ssdp:discover"\r\nST: urn:dmtf-org:service:redfish-rest:1\r\nMX: 3\r\n\r\n' s6.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_IF, nicidx) s6.sendto(msg, ('ff02::c', 1900))