#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.107 2005-01-25 16:27:56 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.109 2005-04-20 22:15:17 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
len = EXTRACT_16BITS(p);
p += 2;
+ if ((int)len > length) {
+ printf(", length %u > packet size", len);
+ return;
+ }
+ length = len;
+ if (length < (p - p0)) {
+ printf(", length %u < PAP header length", length);
+ return;
+ }
+
switch (code) {
case PAP_AREQ:
if (length - (p - p0) < 1)
switch (proto) {
case PPP_IP:
- ip_print(b+1, t - b - 1);
- goto cleanup;
+ ip_print(gndo, b+1, t - b - 1);
+ goto cleanup;
#ifdef INET6
case PPP_IPV6:
ip6_print(b+1, t - b - 1);
case ETHERTYPE_IP: /*XXX*/
case PPP_VJNC:
case PPP_IP:
- ip_print(p, length);
+ ip_print(gndo, p, length);
break;
#ifdef INET6
case ETHERTYPE_IPV6: /*XXX*/
#endif /* __bsdi__ */
return (hdrlength);
}
+
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 8
+ * End:
+ */