diff options
author | Martin Willi <martin@revosec.ch> | 2012-10-09 11:16:07 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-10-24 11:43:34 +0200 |
commit | 9d422bb1b03255a8b2ba2e594916d3e9bd38f4ee (patch) | |
tree | bf467ee98f165749e7ed585ae50a537682dd13bd /src/libcharon/plugins/lookip/lookip.c | |
parent | f6fb2b98e987d485fc7fba3419646f63904c6cfd (diff) | |
download | strongswan-9d422bb1b03255a8b2ba2e594916d3e9bd38f4ee.tar.bz2 strongswan-9d422bb1b03255a8b2ba2e594916d3e9bd38f4ee.tar.xz |
Send a lookip NOT_FOUND reply if a lookup yields no results
Diffstat (limited to 'src/libcharon/plugins/lookip/lookip.c')
-rw-r--r-- | src/libcharon/plugins/lookip/lookip.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libcharon/plugins/lookip/lookip.c b/src/libcharon/plugins/lookip/lookip.c index 7f5dc8afb..4637e7b0b 100644 --- a/src/libcharon/plugins/lookip/lookip.c +++ b/src/libcharon/plugins/lookip/lookip.c @@ -102,6 +102,9 @@ static int receive(int fd, int block) case LOOKIP_ENTRY: label = "lookup:"; break; + case LOOKIP_NOT_FOUND: + label = "not found:"; + break; case LOOKIP_NOTIFY_UP: label = "up:"; break; @@ -117,7 +120,7 @@ static int receive(int fd, int block) resp.id[sizeof(resp.id) - 1] = '\0'; resp.name[sizeof(resp.name) - 1] = '\0'; - printf("%-8s %16s %16s %20s %s\n", + printf("%-12s %16s %16s %20s %s\n", label, resp.vip, resp.ip, resp.name, resp.id); } } |