Bug 17178

Summary: [MFC] -d option of lpd didnt work
Product: Base System Reporter: satherrl <satherrl>
Component: miscAssignee: Garance A Drosehn <gad>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.4-STABLE   
Hardware: Any   
OS: Any   

Description satherrl 2000-03-04 12:50:01 UTC
lpd -d -l produces an error

setsockopt (SO_DEBUG): Invalid Argument

and aborts the lpd

Fix: 

<       int f, funix, finet, options, fromlen, i, errs;
---
>       int f, funix, finet, options, fromlen, i, errs, mflag;
283,284c283,285
<               if (options & SO_DEBUG)
<                       if (setsockopt(finet, SOL_SOCKET, SO_DEBUG, 0, 0) < 0) {
---
>               if (options & SO_DEBUG) {
>                       mflag=1;
>                       if (setsockopt(finet, SOL_SOCKET, SO_DEBUG, &mflag, sizeof(mflag)) < 0) {
287a289
>               }

use the right args to setsockopt, use 'option TCPDEBUG' in the kernel,
use trpt -a   (seems to work for me :-)
How-To-Repeat: type 
	lpd -d -l
Comment 1 Garance A Drosehn freebsd_committer freebsd_triage 2000-11-15 06:01:18 UTC
State Changed
From-To: open->suspended

The suggested patch has been applied to lpd in freebsd-current (with a few 
minor changes).  Change is awaiting MFC. 


Comment 2 Garance A Drosehn freebsd_committer freebsd_triage 2000-11-15 06:01:18 UTC
Responsible Changed
From-To: freebsd-bugs->gad@FreeBSD.org

I'm cleaning out all the PR's related to lpr, lpd & friends.
Comment 3 Garance A Drosehn freebsd_committer freebsd_triage 2000-12-27 17:20:39 UTC
State Changed
From-To: suspended->closed

Fix has been applied on both -current (5.x) and -stable (post 4.2)