Date: Thu, 28 Feb 2002 10:14:06 +0100 From: Marcel de Vries <mdevries@haveityourway.nl> To: freebsd-net@freebsd.org Subject: no more buffer problems yes!! Message-ID: <5.1.0.14.2.20020228094227.01e325d0@outshine>
next in thread | raw e-mail | index | archive | help
Hi all, The problem I had with 'no buffer available' messages is solved. Mpd seemed to be the problem. I'm using pptpclient-1.0.3 at this very moment, tested my mxstream ADSL inet connection in all kinds of ways with (ICMP traffic, UDP, TCP) and no buffer problems. Mpd was generating these problems, and with al respect of Mpd coders, I applied a patch on Mpd to use mpd in combination with mxstream ADSL. The patch was written for Mpd version 3.2. I applied this patch on v3.7 to meet the requirements for connecting to the internet. For you all unfamiliar with the patch en purpose stick close now: Without C experience, I can tell the function for the patch. I think not ;-) but I'll try! Mpd needs to call this script, that's what a peace of the patch is about I think. Mxstream-up script: #!/bin/sh # ng0 inet 10.162.75.185 195.190.240.193 INTERFACE=$1 PROTOCOL=$2 LOCAL=$3 REMOTE=$4 /sbin/route delete default /sbin/ifconfig ng0 mtu 1492 /sbin/route add default $REMOTE [ -x /sbin/ipnat ] && /sbin/ipnat -CF -f /etc/ipnat.conf && ipf -y && echo -n 'ipnat' -------------- My mpd.conf, peep this: default: load mxstream mxstream: new -i ng0 mxs mxs #log -auth -ccp -chat -fsm -iface -pptp -ipcp -lcp -link -phys set iface disable on-demand set iface idle 0 set iface up-script "/usr/local/sbin/mxstream-up" set bundle disable multilink set bundle authname thuglord@xs4all-fast-adsl set link yes acfcomp protocomp set link no chap set link yes pap set link disable pap set link keep-alive 10 75 set ipcp yes vjcomp set ipcp enable req-pri-dns set ipcp enable req-sec-dns open Please everybody is free to fix the patch below, because my C poor as hell. I liked mpd very much, but I have changed to pptp-client to fix the no buffer space problems. orginal patch source: ----------------------------------------start------------------------------- *** work/mpd-3.2/src/Makefile.orig Tue Oct 10 23:15:28 2000 --- work/mpd-3.2/src/Makefile Wed Feb 21 21:04:01 2001 *************** *** 63,68 **** --- 63,69 ---- COPTS+= -DPATH_CONF_DIR=\"${MPD_CONF_DIR}\" COPTS+= -DSYSLOG_FACILITY=${SYSLOG_FACILITY} COPTS+= -DMPD_VERSION='"${MPD_VERSION}"' + COPTS+= -DMXSTREAM # Standard sources *** work/mpd-3.2/src/pptp.c.orig Tue Oct 10 23:15:28 2000 --- work/mpd-3.2/src/pptp.c Wed Feb 21 21:04:01 2001 *************** *** 20,25 **** --- 20,26 ---- #include <netgraph/ng_pptpgre.h> #include <netgraph.h> + /* * DEFINITIONS */ *************** *** 48,53 **** --- 49,57 ---- u_short peer_port; /* Current peer port */ struct optinfo options; struct pptpctrlinfo cinfo; + #ifdef MXSTREAM + char phoneNum[PPTP_PHONE_LEN + 1]; + #endif }; typedef struct pptpinfo *PptpInfo; *************** *** 57,62 **** --- 61,69 ---- SET_PEERADDR, SET_ENABLE, SET_DISABLE, + #ifdef MXSTREAM + SET_PHONENUM, + #endif }; /* Binary options */ *************** *** 132,137 **** --- 139,148 ---- PptpSetCommand, NULL, (void *) SET_ENABLE }, { "disable [opt ...]", "Disable option", PptpSetCommand, NULL, (void *) SET_DISABLE }, + #ifdef MXSTREAM + { "phone string", "Phone number", + PptpSetCommand, NULL, (void *) SET_PHONENUM }, + #endif { NULL }, }; *************** *** 271,280 **** cinfo = PptpCtrlInCall(linfo, ip, port, PPTP_BEARCAP_ANY, PPTP_FRAMECAP_SYNC, PPTP_CALL_MIN_BPS, PPTP_CALL_MAX_BPS, inet_ntoa(gLocalIp), "", ""); ! else cinfo = PptpCtrlOutCall(linfo, ip, port, PPTP_BEARCAP_ANY, PPTP_FRAMECAP_SYNC, PPTP_CALL_MIN_BPS, PPTP_CALL_MAX_BPS, "", ""); if (cinfo.cookie == NULL) return(-1); pptp->peer_addr = ip; --- 282,299 ---- cinfo = PptpCtrlInCall(linfo, ip, port, PPTP_BEARCAP_ANY, PPTP_FRAMECAP_SYNC, PPTP_CALL_MIN_BPS, PPTP_CALL_MAX_BPS, inet_ntoa(gLocalIp), "", ""); ! else { ! #ifdef MXSTREAM ! Log(LG_PPTP, ("[%s] phonenum [%s] used", lnk->name, pptp->phoneNum)); ! cinfo = PptpCtrlOutCall(linfo, ip, port, ! PPTP_BEARCAP_ANY, PPTP_FRAMECAP_SYNC, ! PPTP_CALL_MIN_BPS, PPTP_CALL_MAX_BPS, pptp->phoneNum, ""); ! #else cinfo = PptpCtrlOutCall(linfo, ip, port, PPTP_BEARCAP_ANY, PPTP_FRAMECAP_SYNC, PPTP_CALL_MIN_BPS, PPTP_CALL_MAX_BPS, "", ""); + #endif + } if (cinfo.cookie == NULL) return(-1); pptp->peer_addr = ip; *************** *** 732,737 **** --- 751,761 ---- DisableCommand(ac, av, &pptp->options, gConfList); PptpListenUpdate(); break; + #ifdef MXSTREAM + case SET_PHONENUM: + snprintf(pptp->phoneNum, PPTP_PHONE_LEN + 1, "%s", *av); + break; + #endif default: assert(0); } ---------------------------------end---------------------------- Ok thats all folks, Regards, Marcel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.1.0.14.2.20020228094227.01e325d0>