Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!floyd!harpo!seismo!hao!hplabs!sri-unix!salkind@nyu From: salkind%nyu@sri-unix.UUCP Newsgroups: net.unix-wizards Subject: rwhod fails on point to point links Message-ID: <17236@sri-arpa.UUCP> Date: Tue, 6-Mar-84 16:29:24 EST Article-I.D.: sri-arpa.17236 Posted: Tue Mar 6 16:29:24 1984 Date-Received: Fri, 9-Mar-84 01:25:20 EST Lines: 23 From: Lou SalkindSubject: rwhod fails on point to point links Index: etc/rwhod/rwhod.c 4.2BSD Description: rwhod will not send datagram packets over point to point links. Fix: The problem is that the SIOCGIFxxx calls clobber the ifr_name field. The easy solution is just to have rwhod.c to set this field again. Add the following strcpy line (around line 366) in rwhod.c: if (np->n_flags & IFF_POINTOPOINT) { strcpy(ifreq.ifr_name, ifr->ifr_name); if (ioctl(s, SIOCGIFDSTADDR, (char *)&ifreq) < 0) { Another reasonable thing to do is to change the kernel so that ifr_name doesn't get clobbered in the first place (I have done this). To make this change, you will have to modify net/if.c:ifunit. Replace the line unit = *cp - '0', *cp = 0; with unit = *cp - '0';