]> The Tcpdump Group git mirrors - tcpdump/commitdiff
bugfix: ggsn: parse against cookies and not the ip header
authorhannes <hannes>
Wed, 14 Jun 2006 21:40:00 +0000 (21:40 +0000)
committerhannes <hannes>
Wed, 14 Jun 2006 21:40:00 +0000 (21:40 +0000)
print-juniper.c

index 58cdd999b9b04bcdf7f43c77ace54afa7495e28d..a4f70ada1818152082ce786a9169d276b3635700 100644 (file)
@@ -15,7 +15,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-juniper.c,v 1.32 2006-06-14 16:13:51 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-juniper.c,v 1.33 2006-06-14 21:40:00 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -467,13 +467,14 @@ juniper_ggsn_print(const struct pcap_pkthdr *h, register const u_char *p)
             return l2info.header_len;
 
         p+=l2info.header_len;
-        gh = (struct juniper_ggsn_header *)p;
+        gh = (struct juniper_ggsn_header *)&l2info.cookie;
 
-        if (eflag)
+        if (eflag) {
             printf("proto %s (%u), vlan %u: ",
                    tok2str(juniper_protocol_values,"Unknown",gh->proto),
                    gh->proto,
                    EXTRACT_16BITS(&gh->vlan_id[0]));
+        }
 
         switch (gh->proto) {
         case JUNIPER_PROTO_IPV4: