Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f81b2e7d authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki
Browse files

ipv6: Do not forward packets with the unspecified source address.



RFC4291 2.5.2.

Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
parent d68b8270
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -498,7 +498,8 @@ int ip6_forward(struct sk_buff *skb)
		int addrtype = ipv6_addr_type(&hdr->saddr);

		/* This check is security critical. */
		if (addrtype & (IPV6_ADDR_MULTICAST|IPV6_ADDR_LOOPBACK))
		if (addrtype == IPV6_ADDR_ANY ||
		    addrtype & (IPV6_ADDR_MULTICAST | IPV6_ADDR_LOOPBACK))
			goto error;
		if (addrtype & IPV6_ADDR_LINKLOCAL) {
			icmpv6_send(skb, ICMPV6_DEST_UNREACH,