+ if (length_type == ETHERTYPE_MACSEC) {
+ /*
+ * MACsec, aka IEEE 802.1AE-2006
+ * Print the header, and try to print the payload if it's not encrypted
+ */
+ int ret = macsec_print(ndo, &p, &length, &caplen, &hdrlen, &length_type);
+
+ if (ret == 0) {
+ /* Payload is encrypted; just quit. */
+ return (hdrlen + caplen);
+ } else if (ret > 0) {
+ /* Problem printing the header; just quit. */
+ return (ret);
+ }
+ }
+