From e070cf232ffadbdbbca68b132ef369675890e566 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 18 Dec 2002 08:53:18 +0000 Subject: We no longer use "packetp" for anything, so eliminate it. (If any dissector really needs source and destination MAC addresses, we should make global pointers to them - which would be null for packets lacking MAC addresses, so dissectors that need them will need to do something sensible if those pointers are null.) Don't fake up an Ethernet header if there aren't any MAC addresses to use when faking it up. "bp_chaddr" in "print-bootp.c" is an array, so "bp->bp_chaddr" cannot be null, and there's no need to test for it not being null. --- print-pppoe.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'print-pppoe.c') diff --git a/print-pppoe.c b/print-pppoe.c index 3456225b..3d78f4ce 100644 --- a/print-pppoe.c +++ b/print-pppoe.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = -"@(#) $Header: /tcpdump/master/tcpdump/print-pppoe.c,v 1.18 2002-09-05 21:25:45 guy Exp $ (LBL)"; +"@(#) $Header: /tcpdump/master/tcpdump/print-pppoe.c,v 1.19 2002-12-18 08:53:23 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -101,11 +101,10 @@ pppoe_if_print(u_char *user _U_, const struct pcap_pkthdr *h, ts_print(&h->ts); /* - * Some printers want to get back at the link level addresses, - * and/or check that they're not walking off the end of the packet. - * Rather than pass them all the way down, we set these globals. + * Some printers want to check that they're not walking off the + * end of the packet. + * Rather than pass it all the way down, we set this global. */ - packetp = p; snapend = p + caplen; hdr_len = pppoe_print(p, length); -- cgit v1.2.1