Skip to content

Commit 652b7f6

Browse files
jukkarcfriedt
authored andcommitted
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: Jukka Rissanen <[email protected]> (cherry picked from commit 8d3d48e)
1 parent 32748c6 commit 652b7f6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

subsys/net/ip/ipv6.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,11 @@ enum net_verdict net_ipv6_input(struct net_pkt *pkt, bool is_loopback)
488488
NET_DBG("DROP: invalid scope multicast packet");
489489
goto drop;
490490
}
491+
492+
if (net_ipv6_is_my_addr(&hdr->src)) {
493+
NET_DBG("DROP: src addr is %s", "mine");
494+
goto drop;
495+
}
491496
}
492497

493498
/* Check extension headers */

0 commit comments

Comments
 (0)