Commit 8b1f06af authored by Jukka Rissanen's avatar Jukka Rissanen Committed by Benjamin Cabé
Browse files

drivers: net: loopback: Set interface name to lo

Set the loopback interface name to "lo" instead of using the
default "dummy0" as the former is a more appropriate.

Signed-off-by: default avatarJukka Rissanen <jukka.rissanen@nordicsemi.no>
parent f2ef6541
Loading
Loading
Loading
Loading
+9 −0
Changes for drivers/net/loopback.c: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -72,6 +72,15 @@ static void loopback_init(struct net_if *iface)
			LOG_ERR("Failed to register IPv6 loopback address");
		}
	}

	if (IS_ENABLED(CONFIG_NET_INTERFACE_NAME)) {
		int ret;

		ret = net_if_set_name(iface, "lo");
		if (ret < 0) {
			LOG_ERR("Failed to set loopback interface name (%d)", ret);
		}
	}
}

#ifdef CONFIG_NET_LOOPBACK_SIMULATE_PACKET_DROP