Skip to content
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

IPP backend does not monitor side-channel requests. #4645

Closed
michaelrsweet opened this issue Jun 23, 2015 · 5 comments
Closed

IPP backend does not monitor side-channel requests. #4645

michaelrsweet opened this issue Jun 23, 2015 · 5 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 2.0-current
CUPS.org User: arao

Current backend/ipp.c lacks a line of code that is needed to monitor side-channel request.

I think that CUPS_SC_FD should be monitored.
Please see attached the patch file.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

"ipp.patch":

--- before/ipp.c 2015-06-23 12:58:57.000000000 +0900
+++ after/ipp.c 2015-06-23 12:59:46.000000000 +0900
@@ -1571,6 +1571,7 @@
FD_ZERO(&input);
FD_SET(fd, &input);
FD_SET(snmp_fd, &input);

  • FD_SET(CUPS_SC_FD, &input);
    
       while (select(fd > snmp_fd ? fd + 1 : snmp_fd + 1, &input, NULL, NULL,
                NULL) <= 0 && !job_canceled);
    

@michaelrsweet
Copy link
Collaborator Author

"ipp_v2.patch":

--- before/ipp.c 2015-06-25 11:11:11.000000000 +0900
+++ after/ipp.c 2015-06-25 11:12:52.000000000 +0900
@@ -1576,6 +1576,10 @@
while (select(fd > snmp_fd ? fd + 1 : snmp_fd + 1, &input, NULL, NULL,
NULL) <= 0 && !job_canceled);

  •    if (FD_ISSET(CUPS_SC_FD, &input))
    
  •        backendCheckSideChannel(snmp_fd, http->hostaddr);
    
  • if (FD_ISSET(snmp_fd, &input))
    backendCheckSideChannel(snmp_fd, http->hostaddr);

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: arao

Thank you for your response.

However, I notice that it still lacks some code needed to deal with side-channel request.
I made a patch which makes ipp backend work well apparently, but I am not sure the design is appropriate.
Please check whether the design is proper or not.

Additionally, if there are something similar to this elsewhere, I hope they are checked and fixed.

background:
Currently, "cupsSideChannelSNMPWalk" times out when it was called from CUPS filter because the side-channel request is ignored.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: lisa0705

I got the same issue.
How have things been after that?

@michaelrsweet michaelrsweet added this to the Stable milestone Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant