]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-nsh.c
Update print-esp.c
[tcpdump] / print-nsh.c
index 0130e6dd1c96f9a1c88ea4b4ad5c4e4767f8ea59..abd722d40454db9b30454e2a567ae0805c67de54 100644 (file)
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/* \summary: Network Service Header (NSH) printer */
+
+/* specification: draft-ietf-sfc-nsh-01 */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -41,10 +45,6 @@ static const struct tok nsh_flags [] = {
 #define NSH_SERVICE_PATH_HDR_LEN 4
 #define NSH_HDR_WORD_SIZE 4U
 
-/*
- * NSH, draft-ietf-sfc-nsh-01 Network Service Header
- */
-
 void
 nsh_print(netdissect_options *ndo, const u_char *bp, u_int len)
 {
@@ -170,7 +170,7 @@ nsh_print(netdissect_options *ndo, const u_char *bp, u_int len)
         ip6_print(ndo, bp, next_len);
         break;
     case 0x3:
-        ether_print(ndo, bp, next_len, next_len, NULL, NULL);
+        ether_print(ndo, bp, next_len, ndo->ndo_snapend - bp, NULL, NULL);
         break;
     default:
         ND_PRINT((ndo, "ERROR: unknown-next-protocol"));