Found by a colleague and verified against latest tcpdump version.

I don't know where the -1 comes from, but it is wrong.

OK?

martijn@

Index: print-cdp.c
===================================================================
RCS file: /cvs/src/usr.sbin/tcpdump/print-cdp.c,v
retrieving revision 1.7
diff -u -p -r1.7 print-cdp.c
--- print-cdp.c 5 Apr 2019 00:57:59 -0000       1.7
+++ print-cdp.c 11 Sep 2019 12:33:51 -0000
@@ -115,7 +115,7 @@ cdp_print(const u_char *p, u_int length,
                case 0x0a:              /* guess - not documented */
                        if (len < 6)
                                goto error;
-                       printf(" Native-VLAN-ID %d", (p[i+4]<<8) + p[i+4+1] - 1 
);
+                       printf(" Native-VLAN-ID %d", (p[i+4]<<8) + p[i+4+1]);
                        break;
                case 0x0b:              /* guess - not documented */
                        if (len < 5)

Reply via email to