]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix behavior of "reserve=rfc1179" in backend/lpd.c
authorzdohnal <zdohnal@redhat.com>
Wed, 13 Sep 2023 11:49:26 +0000 (13:49 +0200)
committerGitHub <noreply@github.com>
Wed, 13 Sep 2023 11:49:26 +0000 (13:49 +0200)
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

1  2 
backend/lpd.c

diff --cc backend/lpd.c
Simple merge