fix: error message
This commit is contained in:
parent
297d38bff1
commit
f9b84f709c
1 changed files with 6 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "version_gen.h"
|
||||
#include "ping/ft_ping_flags.h"
|
||||
#include "internal/ping/output.h"
|
||||
#include "internal/ping/scheduler.h"
|
||||
|
|
@ -26,7 +28,11 @@ ping_run(const struct ping_config *config)
|
|||
return 1;
|
||||
handle = icmp_create();
|
||||
if (NULL == handle)
|
||||
{
|
||||
dprintf(STDERR_FILENO, "%s: requires CAP_NET_RAW or root privileges\n",
|
||||
g_prog_name.name);
|
||||
return 1;
|
||||
}
|
||||
if (HAS_FLAG(config->flags, FLAG_DONT_FRAGMENT)
|
||||
&& 0 != icmp_set_dont_fragment(handle))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue