Commit 22430ef8 authored by Armin Brauns's avatar Armin Brauns Committed by Stephanos Ioannidis
Browse files

net: ipv6_nbr: count outgoing ND packets as sent ICMP packets



This mirrors the behaviour of MLD packets, the only other ICMPv6 subtype
that is tracked separately.

Inbound ND packets are already counted as received ICMP packets by way of
going through the ICMP receive path.

Signed-off-by: default avatarArmin Brauns <armin.brauns@embedded-solutions.at>
parent abd4dd4c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1104,6 +1104,7 @@ int net_ipv6_send_na(struct net_if *iface, const struct in6_addr *src,
		goto drop;
	}

	net_stats_update_icmp_sent(net_pkt_iface(pkt));
	net_stats_update_ipv6_nd_sent(iface);

	return 0;
@@ -1952,6 +1953,7 @@ int net_ipv6_send_ns(struct net_if *iface,
		goto drop;
	}

	net_stats_update_icmp_sent(net_pkt_iface(pkt));
	net_stats_update_ipv6_nd_sent(iface);

	return 0;
@@ -2023,6 +2025,7 @@ int net_ipv6_send_rs(struct net_if *iface)
		goto drop;
	}

	net_stats_update_icmp_sent(net_pkt_iface(pkt));
	net_stats_update_ipv6_nd_sent(iface);

	return 0;