Commit 652b7f6f authored by Jukka Rissanen's avatar Jukka Rissanen Committed by Chris Friedt
Browse files

net: ipv6: Check that received src address is not mine



Drop received packet if the source address is the same as
the device address.

Signed-off-by: default avatarJukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 8d3d48e0)
parent 32748c69
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -488,6 +488,11 @@ enum net_verdict net_ipv6_input(struct net_pkt *pkt, bool is_loopback)
			NET_DBG("DROP: invalid scope multicast packet");
			goto drop;
		}

		if (net_ipv6_is_my_addr(&hdr->src)) {
			NET_DBG("DROP: src addr is %s", "mine");
			goto drop;
		}
	}

	/* Check extension headers */