-
Bug
-
Resolution: Done-Errata
-
Normal
-
rhel-8.9.0
-
None
-
libtirpc-1.1.4-12.el8_10
-
None
-
Moderate
-
rhel-sst-filesystems
-
ssg_filesystems_storage_and_HA
-
None
-
False
-
-
None
-
Red Hat Enterprise Linux
-
None
-
-
All
-
None
net.ipv4.ip_local_port_range default should be 32768 60999
User uses a custom value and has code in the pattern.
transp = svcudp_create(RPC_ANYSOCK);
But the value frequently is out of the range of net.ipv4.ip_local_port_range
This should be a side effect of possibly non related behavior.
User did rely on it working on RHEL6, where glibc did choose the value with:
if ((sock = __socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
but {{libtirpc }}basically has the code:
/* * Dynamic port range as defined in RFC 6335 Section 6. * This range avoids all IANA-assigned service port * numbers. */ enum { LOWPORT = 49152, ENDPORT = 65534, NPORTS = ENDPORT - LOWPORT + 1, }; ... port = (rand_r(&seed) % NPORTS) + LOWPORT; for (i = 0; i < NPORTS; ++i) { *portp = htons(port++); res = bind(fd, sap, salen);
in src/binddynport.c
There is no easy workaround. The RHEL8 libtirpc package does not include the patch, or variant of https://sourceforge.net/p/libtirpc/mailman/message/37667337/ that could be used as a way to set the ports to not be used.
The proper fix might be to adapt the logic in the above patch to respect net.ipv4.ip_local_port_range assuming this is the correct or expected behavior, otherwise, a different approach might be required.
- links to
-
RHBA-2024:129574 libtirpc update