Messages in this thread Patch in this message | | | From | "Nicholas J. Leon" <> | Date | Sun, 21 Dec 1997 12:41:15 -0500 (EST) | Subject | Re: socket.h errors in ppp compile |
| |
On Sun, 21 Dec 1997, Nicholas J. Leon wrote:
# # Are you sure you are using ppp-2.3.2 and not ppp-2.2.0f? # # Possitive :) # # # If so, how did you compile it? # # Not sure :-/ Maybe I hacked it up, maybe I got a patch from someone, I # forget. Would you like me to send you a copy of the sources?
Just to follow up, here is the patch I used to get it to compile (after searching, this is what I found):
--- sys-linux.c.orig Thu Dec 4 21:18:36 1997 +++ sys-linux.c Fri Dec 5 23:10:39 1997 @@ -1847,9 +1847,6 @@ while ((utp = getutent()) && (utp->ut_pid != mypid)) /* nothing */; - /* Is this call really necessary? There is another one after the 'put' */ - endutent(); - if (utp) { memcpy(&ut, utp, sizeof(ut)); @@ -2236,28 +2233,30 @@ /* * Add the device route */ - if (strcmp(utsname.release, "2.1.16") < 0) { - SET_SA_FAMILY (rt.rt_dst, AF_INET); - SET_SA_FAMILY (rt.rt_gateway, AF_INET); - rt.rt_dev = ifname; - - ((struct sockaddr_in *) &rt.rt_gateway)->sin_addr.s_addr = 0L; - ((struct sockaddr_in *) &rt.rt_dst)->sin_addr.s_addr = his_adr; - rt.rt_flags = RTF_UP | RTF_HOST; - - if (strcmp(utsname.release, "2.1.0") > 0) { - SET_SA_FAMILY (rt.rt_genmask, AF_INET); - ((struct sockaddr_in *) &rt.rt_genmask)->sin_addr.s_addr = -1L; - } - - if (ioctl(sock_fd, SIOCADDRT, &rt) < 0) - { - if (! ok_error (errno)) - { - syslog (LOG_ERR, "ioctl(SIOCADDRT) device route: %m(%d)", errno); - } - return (0); + if (nopeerroute!=1) { + if (strcmp(utsname.release, "2.1.16") < 0) { + SET_SA_FAMILY (rt.rt_dst, AF_INET); + SET_SA_FAMILY (rt.rt_gateway, AF_INET); + rt.rt_dev = ifname; + + ((struct sockaddr_in *) &rt.rt_gateway)->sin_addr.s_addr = 0L; + ((struct sockaddr_in *) &rt.rt_dst)->sin_addr.s_addr = his_adr; + rt.rt_flags = RTF_UP | RTF_HOST; + + if (strcmp(utsname.release, "2.1.0") > 0) { + SET_SA_FAMILY (rt.rt_genmask, AF_INET); + ((struct sockaddr_in *) &rt.rt_genmask)->sin_addr.s_addr = -1L; } + + if (ioctl(sock_fd, SIOCADDRT, &rt) < 0) + { + if (! ok_error (errno)) + { + syslog (LOG_ERR, "ioctl(SIOCADDRT) device route: %m(%d)", errno); + } + return (0); + } + } } return 1; }
___________________________________________________________________________ simple is elegant nicholas@binary9.net ___________________________________________________________________________
| |