Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Dec 1995 23:02:14 -0500 (EST)
From:      "Marc G. Fournier" <scrappy@hub.org>
To:        current@freebsd.org
Subject:   [CRITICAL] patch for /usr/src/sys/net/if_tun.c
Message-ID:  <Pine.BSF.3.91.951209225932.14418B-100000@hub.org>

next in thread | raw e-mail | index | archive | help

Hi...

	The string 'name' isn't defined in /usr/src/sys/net/if_tun.c.
since it is being used in:

#ifdef DEVFS
                sprintf(name, "tun%d", i );
                tun_devfs_token[i] = devfs_add_devsw(
                        "/", name, &tun_cdevsw , i,
                        DV_CHR, 0, 0, 0600);
#endif

	The following patch makes the assumption (this is my first attempt
at doing *anything* in the kernel) that tun will never become tun9999 and
declares name as being an 8 character string.  


*** net/if_tun.c.orig     Sat Dec  9 22:55:56 1995
--- net/if_tun.c  Sat Dec  9 22:58:10 1995
***************
*** 108,113 ****
--- 108,116 ----
        register int i;
        struct ifnet *ifp;
        dev_t dev;
+ #ifdef DEVFS
+       char name[8];
+ #endif

        if( tun_devsw_installed ) return;
        dev = makedev(CDEV_MAJOR, 0);



Marc G. Fournier | POP Mail  Telnet Acct  DNS Hosting
scrappy@hub.org  |  WWW Services   Database Services  | Knowledge, 
 soon to be:     |                                    | Information and
scrappy@ki.net   |      WWW: http://hub.org           | Communications, Inc




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.951209225932.14418B-100000>