summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Carlson <carlsonj@workingcode.com>2004-11-15 00:57:54 +0000
committerJames Carlson <carlsonj@workingcode.com>2004-11-15 00:57:54 +0000
commit69dda243ba613a88ffd951de15b6906e14c49a65 (patch)
tree2733d9a8bfc34b6e58dbd11c5c7b79a3e834b8da
parentf9f667ee187be5d34ac94f11bf366dd218191122 (diff)
downloadppp-69dda243ba613a88ffd951de15b6906e14c49a65.tar.gz
Cut down on spam from Solaris ppp kernel bits: unknown DLPI primitives
(as encountered on Solaris 10) aren't errors, and need to flush out any queued up (undecoded) data on the read side after pushing ppp_ahdlc.
-rw-r--r--solaris/Makefile.sol24
-rw-r--r--solaris/Makefile.sol2-644
-rw-r--r--solaris/Makefile.sol2gcc4
-rw-r--r--solaris/Makefile.sol2gcc-644
-rw-r--r--solaris/ppp.c5
-rw-r--r--solaris/ppp_ahdlc.c12
6 files changed, 25 insertions, 8 deletions
diff --git a/solaris/Makefile.sol2 b/solaris/Makefile.sol2
index b67902b..c3b2577 100644
--- a/solaris/Makefile.sol2
+++ b/solaris/Makefile.sol2
@@ -1,7 +1,7 @@
#
# Makefile for STREAMS modules for Solaris 2.
#
-# $Id: Makefile.sol2,v 1.2 2003/03/31 12:07:28 carlsonj Exp $
+# $Id: Makefile.sol2,v 1.3 2004/11/15 00:57:54 carlsonj Exp $
#
include Makedefs.sol2
@@ -47,11 +47,13 @@ zlib.o: ../common/zlib.c
$(CC) $(CFLAGS) -c $?
install:
+ /usr/sbin/modunload -i 0
cp ppp ppp.conf /kernel/drv
cp ppp_comp ppp_ahdl /kernel/strmod
if grep clone:ppp /etc/minor_perm; then :; else \
echo clone:ppp 0644 root sys >>/etc/minor_perm; fi
/usr/sbin/rem_drv ppp 2>/dev/null || true
+ /usr/sbin/modunload -i 0
/usr/sbin/add_drv ppp
SRCS = ppp.c ppp_mod.c ppp_ahdlc.c ppp_ahdlc_mod.c \
diff --git a/solaris/Makefile.sol2-64 b/solaris/Makefile.sol2-64
index 1e94890..9d614ae 100644
--- a/solaris/Makefile.sol2-64
+++ b/solaris/Makefile.sol2-64
@@ -1,7 +1,7 @@
#
# Makefile for 64-bit STREAMS modules for Solaris 2.
#
-# $Id: Makefile.sol2-64,v 1.2 2003/03/31 12:07:28 carlsonj Exp $
+# $Id: Makefile.sol2-64,v 1.3 2004/11/15 00:57:54 carlsonj Exp $
#
include Makedefs.sol2
@@ -62,6 +62,7 @@ $(LP64DIR):
mkdir -m 755 -p $@
install:
+ /usr/sbin/modunload -i 0
cp ppp ppp.conf /kernel/drv
cp ppp_comp ppp_ahdl /kernel/strmod
cp $(LP64DIR)/ppp /kernel/drv/$(LP64DIR)
@@ -69,6 +70,7 @@ install:
if grep clone:ppp /etc/minor_perm; then :; else \
echo clone:ppp 0644 root sys >>/etc/minor_perm; fi
/usr/sbin/rem_drv ppp 2>/dev/null || true
+ /usr/sbin/modunload -i 0
/usr/sbin/add_drv ppp
SRCS = ppp.c ppp_mod.c ppp_ahdlc.c ppp_ahdlc_mod.c \
diff --git a/solaris/Makefile.sol2gcc b/solaris/Makefile.sol2gcc
index 59f1869..7d7c943 100644
--- a/solaris/Makefile.sol2gcc
+++ b/solaris/Makefile.sol2gcc
@@ -1,7 +1,7 @@
#
# Makefile for STREAMS modules for Solaris 2.
#
-# $Id: Makefile.sol2gcc,v 1.3 2004/04/14 02:39:39 carlsonj Exp $
+# $Id: Makefile.sol2gcc,v 1.4 2004/11/15 00:57:54 carlsonj Exp $
#
include Makedefs.sol2
@@ -47,11 +47,13 @@ zlib.o: ../common/zlib.c
$(CC) $(CFLAGS) -c $?
install:
+ /usr/sbin/modunload -i 0
cp ppp ppp.conf /kernel/drv
cp ppp_comp ppp_ahdl /kernel/strmod
if grep clone:ppp /etc/minor_perm; then :; else \
echo clone:ppp 0644 root sys >>/etc/minor_perm; fi
/usr/sbin/rem_drv ppp 2>/dev/null || true
+ /usr/sbin/modunload -i 0
/usr/sbin/add_drv ppp
SRCS = ppp.c ppp_mod.c ppp_ahdlc.c ppp_ahdlc_mod.c \
diff --git a/solaris/Makefile.sol2gcc-64 b/solaris/Makefile.sol2gcc-64
index af9ada5..2844a0d 100644
--- a/solaris/Makefile.sol2gcc-64
+++ b/solaris/Makefile.sol2gcc-64
@@ -1,7 +1,7 @@
#
# Makefile for 64-bit STREAMS modules for Solaris 2.
#
-# $Id: Makefile.sol2gcc-64,v 1.2 2003/03/31 12:07:28 carlsonj Exp $
+# $Id: Makefile.sol2gcc-64,v 1.3 2004/11/15 00:57:54 carlsonj Exp $
#
include Makedefs.sol2
@@ -62,6 +62,7 @@ $(LP64DIR):
mkdir -m 755 -p $@
install:
+ /usr/sbin/modunload -i 0
cp ppp ppp.conf /kernel/drv
cp ppp_comp ppp_ahdl /kernel/strmod
cp $(LP64DIR)/ppp /kernel/drv/$(LP64DIR)
@@ -69,6 +70,7 @@ install:
if grep clone:ppp /etc/minor_perm; then :; else \
echo clone:ppp 0644 root sys >>/etc/minor_perm; fi
/usr/sbin/rem_drv ppp 2>/dev/null || true
+ /usr/sbin/modunload -i 0
/usr/sbin/add_drv ppp
SRCS = ppp.c ppp_mod.c ppp_ahdlc.c ppp_ahdlc_mod.c \
diff --git a/solaris/ppp.c b/solaris/ppp.c
index fd5286e..85d7fc7 100644
--- a/solaris/ppp.c
+++ b/solaris/ppp.c
@@ -32,7 +32,7 @@
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: ppp.c,v 1.2 2002/12/06 09:49:16 paulus Exp $
+ * $Id: ppp.c,v 1.3 2004/11/15 00:57:54 carlsonj Exp $
*/
/*
@@ -1430,7 +1430,8 @@ dlpi_request(q, mp, us)
#endif
default:
- cmn_err(CE_CONT, "ppp: unknown dlpi prim 0x%x\n", d->dl_primitive);
+ if (us->flags & US_DBGLOG)
+ DPRINT1("ppp: unknown dlpi prim 0x%x\n", d->dl_primitive);
/* fall through */
badprim:
dlpi_error(q, us, d->dl_primitive, DL_BADPRIM, 0);
diff --git a/solaris/ppp_ahdlc.c b/solaris/ppp_ahdlc.c
index 5bd2fa8..50b914a 100644
--- a/solaris/ppp_ahdlc.c
+++ b/solaris/ppp_ahdlc.c
@@ -49,7 +49,7 @@
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: ppp_ahdlc.c,v 1.3 2002/12/06 09:49:16 paulus Exp $
+ * $Id: ppp_ahdlc.c,v 1.4 2004/11/15 00:57:54 carlsonj Exp $
*/
/*
@@ -58,6 +58,7 @@
#include <sys/types.h>
#include <sys/param.h>
#include <sys/stream.h>
+#include <sys/stropts.h>
#include <sys/errno.h>
#ifdef SVR4
@@ -244,6 +245,7 @@ static u_int32_t paritytab[8] =
MOD_OPEN(ahdlc_open)
{
ahdlc_state_t *state;
+ mblk_t *mp;
/*
* Return if it's already opened
@@ -288,7 +290,13 @@ MOD_OPEN(ahdlc_open)
#endif /* SUNOS4 */
qprocson(q);
-
+
+ if ((mp = allocb(1, BPRI_HI)) != NULL) {
+ mp->b_datap->db_type = M_FLUSH;
+ *mp->b_wptr++ = FLUSHR;
+ putnext(q, mp);
+ }
+
return 0;
}