net: ipv6: Fix sending packets with invalid addresses

When the context being used is bound to a multicast address, the source
address of the IPv6 packet was the multicast address, this is wrong. See
RFC4291, Section 2.7:

"Multicast addresses must not be used as source addresses in IPv6
packets or appear in any Routing header."

If the context was bound to an address that would be invalid as an IPv6
source, we find a better alternative.

Change-Id: Ibefb4f2104e39658babfaaacf02f241c48f010cf
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
1 file changed