"$Id: common.c,v 1.3 2008/06/09 08:34:23 paulus Exp $";
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
#define _GNU_SOURCE 1
#include "pppoe.h"
-#include "pppd/pppd.h"
+#include <pppd/pppd.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <syslog.h> /* for LOG_DEBUG */
+#include <ctype.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
printer(arg, "unknown tag 0x%x", tag);
}
if (tlen) {
+ /* If it is supposed to be text, make sure it's all printing chars */
+ if (text) {
+ for (j = 0; j < tlen; ++j) {
+ if (!isprint(packet->payload[i+j])) {
+ text = 0;
+ break;
+ }
+ }
+ }
if (text)
printer(arg, " %.*s", tlen, &packet->payload[i]);
else {