diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2014-05-23 20:36:05 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2014-05-23 20:36:05 +0000 |
commit | 2d31bd048560e966f5ca1e49551f093a066b0c10 (patch) | |
tree | 6826955ed54f73dbea9a34aa2a1e27b6d6f4f5eb /usr.sbin/tcpdump | |
parent | df40188de9198659daab87b5f829e9d4da8c0fa2 (diff) |
Don't print a "weird flag" type warning "[b2&3=0x2400]" for DNS NOTIFY
messages which should be sent with AA set. Adapted from a patch at
http://marc.info/?l=tcpdump-patches&m=98115734907026&w=2 pointed out by
Peter J. Philipp, ok henning@
Diffstat (limited to 'usr.sbin/tcpdump')
-rw-r--r-- | usr.sbin/tcpdump/nameser.h | 4 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-domain.c | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/tcpdump/nameser.h b/usr.sbin/tcpdump/nameser.h index b21b34d9b15..8ae9c8b8e0f 100644 --- a/usr.sbin/tcpdump/nameser.h +++ b/usr.sbin/tcpdump/nameser.h @@ -1,4 +1,4 @@ -/* @(#) $Id: nameser.h,v 1.6 2010/11/04 17:37:05 canacar Exp $ (LBL) */ +/* @(#) $Id: nameser.h,v 1.7 2014/05/23 20:36:04 sthen Exp $ (LBL) */ /* * Copyright (c) 1983, 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -82,6 +82,8 @@ #if 0 #define xxx 0x3 /* 0x3 reserved */ #endif +#define NS_NOTIFY_OP 0x4 /* notify secondary of SOA change */ + /* non standard - supports ALLOW_UPDATES stuff from Mike Schwartz */ #define UPDATEA 0x9 /* add resource record */ #define UPDATED 0xa /* delete a specific resource record */ diff --git a/usr.sbin/tcpdump/print-domain.c b/usr.sbin/tcpdump/print-domain.c index bc9d3a7e33c..3ea80379581 100644 --- a/usr.sbin/tcpdump/print-domain.c +++ b/usr.sbin/tcpdump/print-domain.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-domain.c,v 1.18 2010/11/04 17:37:05 canacar Exp $ */ +/* $OpenBSD: print-domain.c,v 1.19 2014/05/23 20:36:04 sthen Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 @@ -663,9 +663,10 @@ ns_print(register const u_char *bp, u_int length, int is_mdns) DNS_RD(np) ? "+" : "", DNS_CD(np) ? "%" : ""); - /* any weirdness? */ + /* any weirdness? AA is expected in NOTIFY. */ b2 = EXTRACT_16BITS(((u_short *)np)+1); - if (b2 & 0x6cf) + if ((b2 & 0x6cf) != + (DNS_OPCODE(np) == NS_NOTIFY_OP ? htons(0x400) : 0)) printf(" [b2&3=0x%x]", b2); if (DNS_OPCODE(np) == IQUERY) { |