]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ospf.c
Don't directly fetch multi-byte integers from packets.
[tcpdump] / print-ospf.c
index 4490496468ea57e43a53b115a78013802413978e..983c14f40e12d763dbf95d08ee439fb0b1556a7d 100644 (file)
@@ -982,7 +982,7 @@ ospf_decode_v2(register const struct ospfhdr *op,
                        bittok2str(ospf_dd_flag_values,"none",op->ospf_db.db_flags));
                 TCHECK(op->ospf_db.db_ifmtu);
                 if (op->ospf_db.db_ifmtu) {
-                        printf(", MTU: %u", ntohs(op->ospf_db.db_ifmtu));
+                        printf(", MTU: %u", EXTRACT_16BITS(&op->ospf_db.db_ifmtu));
                 }
                 TCHECK(op->ospf_db.db_seq);
                 printf(", Sequence: 0x%08x", EXTRACT_32BITS(&op->ospf_db.db_seq));