| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
select() doesn't support file descriptors greater than 1023. If the
program has many files open, the socket descriptor can be > 1023 and
then FD_SET(fd, &rfds) causes a buffer overflow.
Switch to poll() and ppoll() which don't have this limitation.
Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
|
|
|
|
|
|
|
|
|
| |
ndptool is of single threaded, so there is no actual problem here.
However, I think it not best to use static variables, and in
this case it can be easily avoided.
Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
|
|
|
|
|
|
|
|
| |
ndptool is single threaded, so this isn't an actual issue. But
it's ugly and unnecessary.
Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
|
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
|
|
|
|
|
|
|
|
|
| |
We use strdup to copy the parameters. As strdup will call malloc when
obtain the memory, we need to free them before exit, or there will be
memory leak. This is found by covscan.
Signed-off-by: Hangbin Liu <haliu@redhat.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch add -D dest option, with this option a user could set the dest
address in IPv6 header for solicited NS/NA message
For function ndp_msg_addrto_adjust_solicit_multi(), I moved the check
in ndp_msg_target_set() instead of in the function itself.
I also use reverse christmas tree variable order in the main() function
of ndptool.c.
Signed-off-by: Hangbin Liu <haliu@redhat.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
|
|
|
|
|
|
|
|
|
| |
In my last commit acccd780df517 ("ndptool: add -T target support"), after
renaming parameter -d to -T. I forgot to change the name in switch opt.
Fixes: acccd780df517 ("ndptool: add -T target support")
Signed-off-by: Hangbin Liu <haliu@redhat.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently ndptool can send a Neighbour Solicitation, but does not target
an IP address, so the NS packet doesn't really make sense.
Extend ndptool to target a destination for Neighbour Solicitation.
v2:
1) remove function ipv6_addr_is_multicast()
2) inline some help functions.
3) update code style.
4) rename parameter -d/--dest to -T/--target
Signed-off-by: Hangbin Liu <haliu@redhat.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
|
|
|
|
|
|
|
| |
FD_ZERO, fd_set, etc are defined within sys/select.h on musl.
Signed-off-by: Kylie McClain <somasis@exherbo.org>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
|
|
|
|
|
|
| |
Fixes: cb1ab5fc8b ("libndp: add option flags to send messages")
Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
|
|
|
|
|
|
|
|
|
| |
Use the new flags interface of message sending, implement sending
Unsolicited NA in ndptool. -U was chosen to mirror established
convention of unsolicited ARP in arping.
Signed-off-by: Jamie Bainbridge <jamie.bainbridge@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
|
|
|
|
| |
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
|
|
|
|
|
|
| |
signalfd() is Linux-specific. Using conventional signal handlers will
allow ndptool to compile on non-Linux systems and old versions of Linux.
Signed-off-by: Andrew Ayer <agwa@andrewayer.name>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
|
|
|
| |
Signed-off-by: Yanko Kaneti <yaneti@declera.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
|
|
| |
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
|
|
| |
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
|
|
| |
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
|
|
| |
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
|
|
| |
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
|
|
| |
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
|
|
| |
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
|
|
| |
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
|
|
| |
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
|
|
| |
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
|
|
| |
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|