From owner-freebsd-bugs Sat Aug 22 03:20:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA15480 for freebsd-bugs-outgoing; Sat, 22 Aug 1998 03:20:06 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA15472 for ; Sat, 22 Aug 1998 03:20:05 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id DAA18756; Sat, 22 Aug 1998 03:20:01 -0700 (PDT) Received: from prova.iet.unipi.it (prova.iet.unipi.it [131.114.9.236]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA15358 for ; Sat, 22 Aug 1998 03:18:12 -0700 (PDT) (envelope-from luigi@prova.iet.unipi.it) Received: (from luigi@localhost) by prova.iet.unipi.it (8.8.8/8.8.8) id KAA00468; Sat, 22 Aug 1998 10:20:46 GMT (envelope-from luigi) Message-Id: <199808221020.KAA00468@prova.iet.unipi.it> Date: Sat, 22 Aug 1998 10:20:46 GMT From: Luigi Rizzo Reply-To: luigi@prova.iet.unipi.it To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: kern/7713: problem with reusing ports with multicast Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 7713 >Category: kern >Synopsis: problem with reusing ports with multicast >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Aug 22 03:20:01 PDT 1998 >Last-Modified: >Originator: Luigi Rizzo >Organization: DEIT >Release: FreeBSD 2.2.7-RELEASE i386 >Environment: all versions starting at least from 2.2.6, with multicast enabled. >Description: some time ago, presumably importing a fix from netbsd, a fix was applied to the FreeBSD networking code that prevented a process to reuse the same port unless it was the same uid as the previous owner, or it was superuser. While this might make some sense for unicast, it makes absolutely no sense for multicast where multiple receivers for the same data are the normal way of operation. It is actually harmful since e.g. it prevents multiple sdr sessions being run from different users on the same machine. The following diff fixes the problem. Would you mind looking at it and possibly committing it ? >How-To-Repeat: try run multiple instances of sdr (or other multicast receivers, e.g. vic i think) as different non-root users on the same machine. >Fix: diff -ubwr /usr/CVS-luigi-checkout/src/sys/netinet/in_pcb.c /mnt/src/sys/netinet.luigi/in_pcb.c --- /usr/CVS-luigi-checkout/src/sys/netinet/in_pcb.c Mon Mar 2 07:58:17 1998 +++ /mnt/src/sys/netinet.luigi/in_pcb.c Mon Jun 1 08:36:58 1998 @@ -190,7 +190,8 @@ if (ntohs(lport) < IPPORT_RESERVED && (error = suser(p->p_ucred, &p->p_acflag))) return (EACCES); - if (so->so_uid) { + if (so->so_uid && + !IN_MULTICAST(ntohl(sin->sin_addr.s_addr)) ) { t = in_pcblookup(inp->inp_pcbinfo, zeroin_addr, 0, sin->sin_addr, lport, INPLOOKUP_WILDCARD); >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message