Commit a9de0d5f authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Jim Harris
Browse files

net/interface: check socket() return value



Change-Id: I3abd1d2c98cda10acfb85abc221e294563843c07
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 7912aa4a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -345,6 +345,10 @@ static int netlink_addr_msg(uint32_t ifc_idx, uint32_t ip_address, uint32_t crea
		return -1;

	fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
	if (fd < 0) {
		SPDK_ERRLOG("socket failed!\n");
		return -1;
	}

	/* setup local address & bind using this address. */
	bzero(&la, sizeof(la));