X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/10afb02ac804db7fa41a776fd61eff922c09c4df..f662dad02b51b595592df9fa6b0884e438cef9a3:/print-mobile.c diff --git a/print-mobile.c b/print-mobile.c index 30a4d68a..816ffd6e 100644 --- a/print-mobile.c +++ b/print-mobile.c @@ -41,8 +41,8 @@ #endif #ifndef lint -static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-mobile.c,v 1.11 2002-11-09 17:19:28 itojun Exp $"; +static const char rcsid[] _U_ = + "@(#) $Header: /tcpdump/master/tcpdump/print-mobile.c,v 1.15 2004-03-24 01:58:14 guy Exp $"; #endif #include @@ -60,7 +60,7 @@ struct mobile_ip { u_int16_t hcheck; u_int32_t odst; u_int32_t osrc; -} __attribute__((packed)); +}; #define OSRC_PRES 0x0080 /* old source is present */ @@ -77,7 +77,7 @@ mobile_print(const u_char *bp, u_int length) mob = (const struct mobile_ip *)bp; - if (length < MOBILE_SIZE) { + if (length < MOBILE_SIZE || !TTEST(*mob)) { fputs("[|mobile]", stdout); return; }