Date: Sat, 22 Aug 1998 10:20:46 GMT From: Luigi Rizzo <luigi@prova.iet.unipi.it> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: kern/7713: problem with reusing ports with multicast Message-ID: <199808221020.KAA00468@prova.iet.unipi.it>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808221020.KAA00468>