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

Commit b1b0a4ec authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ipv6: Do not generate random IID only for RAWIP devices"

parents 87d60fb4 8601ea92
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -2217,16 +2217,6 @@ static int ipv6_generate_eui64(u8 *eui, struct net_device *dev)
	case ARPHRD_TUNNEL6:
	case ARPHRD_IP6GRE:
		return addrconf_ifid_ip6tnl(eui, dev);
	case ARPHRD_RAWIP: {
		struct in6_addr lladdr;

		if (ipv6_get_lladdr(dev, &lladdr, IFA_F_TENTATIVE))
			get_random_bytes(eui, 8);
		else
			memcpy(eui, lladdr.s6_addr + 8, 8);

		return 0;
	}
	}
	return -1;
}
@@ -3257,8 +3247,7 @@ static void addrconf_dev_config(struct net_device *dev)
	    (dev->type != ARPHRD_IP6GRE) &&
	    (dev->type != ARPHRD_IPGRE) &&
	    (dev->type != ARPHRD_TUNNEL) &&
	    (dev->type != ARPHRD_NONE) &&
	    (dev->type != ARPHRD_RAWIP)) {
	    (dev->type != ARPHRD_NONE)) {
		/* Alas, we support only Ethernet autoconfiguration. */
		return;
	}