From: zdohnal Date: Wed, 13 Sep 2023 11:49:26 +0000 (+0200) Subject: Fix behavior of "reserve=rfc1179" in backend/lpd.c X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9f0ce570117aa7887004609715bce329fef5235d;p=thirdparty%2Fcups.git Fix behavior of "reserve=rfc1179" in backend/lpd.c In backend/lpd.c, if "reserve=rfc1179" is used in the Device URI, ports from 512-731 will be used instead of only 721=731 as per RFC 1179. cups_rresvport() starts with the value of lport passed in to the function and decrements lport to 512 until an open port is found. Thus, if all ports from 731-721 are unavailable, cups_rresvport() will start binding to ports between 720-512. This patch resolves this issue by adding a parameter to cups_rresvport() that defines the minimum port number that should be used and makes the appropriate changes in lpd_queue(). Resolves #743 --- 9f0ce570117aa7887004609715bce329fef5235d