diff options
author | Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com> | 2022-12-02 12:18:08 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-12-05 12:47:16 -0500 |
commit | eeb0a2c6938226ee3c46fa66971da9231d64667d (patch) | |
tree | 6eb7a6f8caca4976f1f78afa9f229b41e704f67b /net/net6.c | |
parent | 7fbf230d79ad531e680475529191e2ec08099c7d (diff) | |
download | u-boot-eeb0a2c6938226ee3c46fa66971da9231d64667d.zip u-boot-eeb0a2c6938226ee3c46fa66971da9231d64667d.tar.gz u-boot-eeb0a2c6938226ee3c46fa66971da9231d64667d.tar.bz2 |
net: ping6: Add ping6 command
Implement ping6 command to ping hosts using IPv6. It works the same way as
an ordinary ping command. There is no ICMP request so it is not possible
to ping our host. This patch adds options in Kconfig and Makefile to
build ping6 command.
Series-changes: 3
- Added structures and functions descriptions
- Added to ping6_receive() return value instead of void
Series-changes: 4
- Fixed structures and functions description style
Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net/net6.c')
-rw-r--r-- | net/net6.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -404,6 +404,10 @@ int net_ip6_handler(struct ethernet_hdr *et, struct ip6_hdr *ip6, int len) return -EINVAL; switch (icmp->icmp6_type) { + case IPV6_ICMP_ECHO_REQUEST: + case IPV6_ICMP_ECHO_REPLY: + ping6_receive(et, ip6, len); + break; case IPV6_NDISC_NEIGHBOUR_SOLICITATION: case IPV6_NDISC_NEIGHBOUR_ADVERTISEMENT: ndisc_receive(et, ip6, len); |