]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-esp.c
Use "len", not "payload_len", as we step through the packet; use
[tcpdump] / print-esp.c
index 7894fd4816e0bab952aaf27c0fa98c74ccd14b9a..f8654aedbd6375d794278999ba75fa0a5e5d07c6 100644 (file)
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#ifndef lint
+static const char rcsid[] _U_ =
+    "@(#) $Header: /tcpdump/master/tcpdump/print-esp.c,v 1.48 2003-11-19 05:37:18 guy Exp $ (LBL)";
+#endif
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -54,10 +58,6 @@ extern char *strsep(char **stringp, const char *delim); /* Missing/strsep.c */
 #include "addrtoname.h"
 #include "extract.h"
 
-#ifndef lint
-static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-esp.c,v 1.45 2003-11-15 00:39:22 guy Exp $ (LBL)";
-#endif
 #ifndef HAVE_SOCKADDR_STORAGE
 #ifdef INET6
 struct sockaddr_storage {
@@ -337,7 +337,12 @@ esp_print(const u_char *bp, const u_char *bp2
        _U_
 #endif
        ,
-       int *nhdr, int *padlen
+       int *nhdr
+#ifndef HAVE_LIBCRYPTO
+       _U_
+#endif
+       ,
+       int *padlen
 #ifndef HAVE_LIBCRYPTO
        _U_
 #endif
@@ -501,7 +506,5 @@ esp_print(const u_char *bp, const u_char *bp2
 #endif
 
 fail:
-       if (nhdr)
-               *nhdr = -1;
-       return 65536;
+       return -1;
 }