summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@samba.org>2004-09-28 02:13:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:49 -0500
commit4a96fb5d12cfa109a242414b6570cd0e6ce25ece (patch)
treec5774fa3314680803881f51b51791d99efb87227 /source3/utils
parent521268be1caeb9e50274ff17451cbfb8dbb1765f (diff)
downloadsamba-4a96fb5d12cfa109a242414b6570cd0e6ce25ece.tar.gz
samba-4a96fb5d12cfa109a242414b6570cd0e6ce25ece.tar.bz2
samba-4a96fb5d12cfa109a242414b6570cd0e6ce25ece.zip
r2706: The code that prints the remote MAC address (from the statistics section
of the response packet) was outside of the if() that determined whether the query was successful or not. As a result, the MAC address would print out even if there was no MAC address. At least the garbage it printed was relatively consistent. :) I moved the MAC printing into the if() block and added an 'else' to print "No reply..." if the query fails. Chris -)----- (This used to be commit 2a5d66791fa5e1b19e0ec9072af254142245d0c2)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/nmblookup.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c
index 7285712c0b..4ed4284786 100644
--- a/source3/utils/nmblookup.c
+++ b/source3/utils/nmblookup.c
@@ -118,12 +118,15 @@ static void do_node_status(int fd, const char *name, int type, struct in_addr ip
cleanname,status[i].type,
node_status_flags(status[i].flags));
}
+ d_printf("\n\tMAC Address = %02X-%02X-%02X-%02X-%02X-%02X\n",
+ extra.mac_addr[0], extra.mac_addr[1],
+ extra.mac_addr[2], extra.mac_addr[3],
+ extra.mac_addr[4], extra.mac_addr[5]);
+ d_printf("\n");
SAFE_FREE(status);
+ } else {
+ d_printf("No reply from %s\n\n",inet_ntoa(ip));
}
- d_printf("\n\tMAC Address = %02X-%02X-%02X-%02X-%02X-%02X\n",
- extra.mac_addr[0], extra.mac_addr[1], extra.mac_addr[2],
- extra.mac_addr[3], extra.mac_addr[4], extra.mac_addr[5]);
- d_printf("\n");
}