Patch #: 7 Type: bug-fix Priority: low Affects: sites running UAR under HP-UX Reported: Volker Weinberger Summary: dissasociate correctly, avoid duplicate multicast Archived: munnari.OZ.AU mac/cap.patches/uar.1.0.patch07 Application: 'cd uar; patch -p < uar.1.0.patch07' *** uar.h.orig Thu May 19 17:25:54 1994 --- uar.h Thu May 19 19:52:55 1994 *************** *** 15,21 **** * djh@munnari.OZ.AU * * $Author: djh $ ! * $Revision: 1.1.1.3 $ * */ --- 15,21 ---- * djh@munnari.OZ.AU * * $Author: djh $ ! * $Revision: 1.1.1.4 $ * */ *************** *** 55,60 **** --- 55,65 ---- #define rindex(s,c) strrchr((char *)(s),(c)) #define index(s,c) strchr((char *)(s),(c)) #endif /* MAPFUNCS */ + + #ifdef hpux + #define POSIX + #define SINGLE_MCAST + #endif /* hpux */ /* misc numbers */ *** uar.c.orig Tue Oct 26 18:25:53 1993 --- uar.c Thu May 19 19:53:22 1994 *************** *** 15,21 **** * djh@munnari.OZ.AU * * $Author: djh $ ! * $Revision: 1.1.1.2 $ * */ --- 15,21 ---- * djh@munnari.OZ.AU * * $Author: djh $ ! * $Revision: 1.1.1.3 $ * */ *************** *** 264,269 **** --- 264,270 ---- if (!debug) { if (fork()) exit(0); + #ifndef POSIX #ifdef TIOCNOTTY { int f; if ((f = open("/dev/tty", O_RDWR, 0644)) >= 0) { *************** *** 272,277 **** --- 273,281 ---- } } #endif /* TIOCNOTTY */ + #else /* POSIX */ + (void)setsid(); + #endif /* POSIX */ } /* *************** *** 285,292 **** --- 289,298 ---- if (iflist[i].phase == PHASE2) { if (iflist[i].etfd >= 0) eth_addmulti(iflist[i].etfd, iflist[i].if_name, maddr); + #ifndef SINGLE_MCAST if (iflist[i].aarpfd >= 0) eth_addmulti(iflist[i].aarpfd, iflist[i].if_name, maddr); + #endif /* SINGLE_MCAST */ if (iflist[i].net_lo != 0) /* interface already seeded */ zip_multicast(i, ADDMULTI); } *************** *** 491,498 **** --- 497,506 ---- if (iflist[i].phase == PHASE2) { if (iflist[i].etfd >= 0) eth_delmulti(iflist[i].etfd, iflist[i].if_name, maddr); + #ifndef SINGLE_MCAST if (iflist[i].aarpfd >= 0) eth_delmulti(iflist[i].aarpfd, iflist[i].if_name, maddr); + #endif /* SINGLE_MCAST */ if (iflist[i].net_lo != 0) /* interface already seeded */ zip_multicast(i, DELMULTI); } *** Makefile.orig Fri Dec 10 02:04:03 1993 --- Makefile Thu May 19 19:50:51 1994 *************** *** 6,12 **** # # ! # Most supported hosts do not require special CFLAG settings # # The defines for specific packet filters are # -DSNITPF SUN NIT PF (default) --- 6,12 ---- # # ! # CFLAG settings for various supported hosts # # The defines for specific packet filters are # -DSNITPF SUN NIT PF (default) *************** *** 16,40 **** --- 16,53 ---- # # For Sony NEWS OS4.2 or later to allow use of EtherTalk Phase 2 # CFLAGS=-Dsony_phaseII + # LFLAGS= # LIBS= # # For IBM RS6000 AIX, Phase 1 or Phase 2 # CFLAGS=-DAIX + # LFLAGS= # LIBS= # # For SUN Solaris 2.N, Phase 1 or Phase 2 # CFLAGS=-DSOLARIS + # LFLAGS= # LIBS=-lsocket -lnsl # # For DEC Aplha OSF/1, Phase 1 or Phase 2 # CFLAGS= + # LFLAGS= # LIBS=pfopen.o # # For 386BSD, FreeBSD # CFLAGS=-DBPFILT + # LFLAGS= # LIBS= # + # For HP 9000/700 HP-UX 9.x, with HP cc, (optimization suggestion only) + # Using Archive libraries does not result in noticeable performance gain. + # CFLAGS=+ESlit -J +O3 + # LFLAGS=+O3 + # LIBS= + # + CFLAGS= + LFLAGS= LIBS= CC=cc *************** *** 41,47 **** all: uar uar: uar.o aarp.o ddp.o rtmp.o nbp.o zip.o stats.o cap.o tnnl.o pf.o ! ${CC} -o uar uar.o aarp.o ddp.o rtmp.o nbp.o zip.o \ stats.o cap.o tnnl.o pf.o ${LIBS} uar.o: uar.c uar.h --- 54,60 ---- all: uar uar: uar.o aarp.o ddp.o rtmp.o nbp.o zip.o stats.o cap.o tnnl.o pf.o ! ${CC} ${LFLAGS} -o uar uar.o aarp.o ddp.o rtmp.o nbp.o zip.o \ stats.o cap.o tnnl.o pf.o ${LIBS} uar.o: uar.c uar.h *** README.orig Thu May 19 17:28:54 1994 --- README Thu May 19 19:53:40 1994 *************** *** 4,10 **** The University of Melbourne djh@munnari.OZ.AU October, 1993 ! version 1.0.6 --- 4,10 ---- The University of Melbourne djh@munnari.OZ.AU October, 1993 ! version 1.0.7