View | Details | Raw Unified | Return to bug 1182804
Collapse All | Expand All

(-)a/fcping.c (-2 / +6 lines)
Lines 570-575 fp_ns_get_id(uint32_t op, fc_wwn_t wwn, char *response, size_t *resp_len) Link Here
570
	struct sg_io_v4 sg_io;
570
	struct sg_io_v4 sg_io;
571
	size_t actual_len;
571
	size_t actual_len;
572
	int cmd, rc = 0;
572
	int cmd, rc = 0;
573
	uint32_t *uct = (uint32_t *)&ct.hdr;
573
574
574
	memset((char *)&cdb, 0, sizeof(cdb));
575
	memset((char *)&cdb, 0, sizeof(cdb));
575
	memset(&ct, 0, sizeof(ct));
576
	memset(&ct, 0, sizeof(ct));
Lines 584-591 fp_ns_get_id(uint32_t op, fc_wwn_t wwn, char *response, size_t *resp_len) Link Here
584
585
585
	cdb.msgcode = FC_BSG_HST_CT;
586
	cdb.msgcode = FC_BSG_HST_CT;
586
	hton24(cdb.rqst_data.h_ct.port_id, 0xfffffc);
587
	hton24(cdb.rqst_data.h_ct.port_id, 0xfffffc);
587
	memcpy(&cdb.rqst_data.h_ct.preamble_word0, &ct.hdr,
588
588
	       3 * sizeof(uint32_t));
589
	/* copy preamble words one at a time, to make compiler happy */
590
	cdb.rqst_data.h_ct.preamble_word0 = uct[0];
591
	cdb.rqst_data.h_ct.preamble_word1 = uct[1];
592
	cdb.rqst_data.h_ct.preamble_word2 = uct[2];
589
593
590
	sg_io.guard = 'Q';
594
	sg_io.guard = 'Q';
591
	sg_io.protocol = BSG_PROTOCOL_SCSI;
595
	sg_io.protocol = BSG_PROTOCOL_SCSI;
(-)a/fipvlan.c (-3 / +9 lines)
Lines 447-454 static void rtnl_recv_newlink(struct nlmsghdr *nh) Link Here
447
		iff->iflink = *(int *)RTA_DATA(ifla[IFLA_LINK]);
447
		iff->iflink = *(int *)RTA_DATA(ifla[IFLA_LINK]);
448
	else
448
	else
449
		iff->iflink = iff->ifindex;
449
		iff->iflink = iff->ifindex;
450
	memcpy(iff->mac_addr, RTA_DATA(ifla[IFLA_ADDRESS]), ETHER_ADDR_LEN);
450
451
	strncpy(iff->ifname, RTA_DATA(ifla[IFLA_IFNAME]), IFNAMSIZ);
451
	/*
452
	 * copy MAC address and interface name using intermediate
453
	 * arrays, so gcc-11 knows we are not overflowing buffers
454
	 */
455
	if (ifla[IFLA_ADDRESS])
456
		memcpy(iff->mac_addr, RTA_DATA(ifla[IFLA_ADDRESS]), ETHER_ADDR_LEN);
457
	if (ifla[IFLA_IFNAME])
458
		memcpy(iff->ifname, RTA_DATA(ifla[IFLA_IFNAME]), IFNAMSIZ);
452
	iff->ifname[IFNAMSIZ - 1] = '\0';
459
	iff->ifname[IFNAMSIZ - 1] = '\0';
453
460
454
	if (ifla[IFLA_LINKINFO]) {
461
	if (ifla[IFLA_LINKINFO]) {
455
- 

Return to bug 1182804