Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
target-isns.3375
target-isns-fix-remaining-little-endian-IP-addr...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File target-isns-fix-remaining-little-endian-IP-addr.patch of Package target-isns.3375
From a7222ebb245ca79c74f83cb881eeb8ae73a7f39f Mon Sep 17 00:00:00 2001 From: Lee Duncan <lduncan@suse.com> Date: Thu, 15 Oct 2015 18:21:17 -0700 Subject: [PATCH] Fix remaining little-endian IP address handling My prevoius fix missed one place where the IP address was still reversed on big-endian architectures. --- src/isns.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/isns.c b/src/isns.c index ad73af77e217..89bdd3af089b 100644 --- a/src/isns.c +++ b/src/isns.c @@ -424,10 +424,7 @@ static void isns_ip_addr_set(const struct portal *portal, uint8_t *ip_addr) /* RFC 4171 6.3.1: convert v4 to mapped v6 */ ip_addr[10] = ip_addr[11] = 0xff; - ip_addr[15] = 0xff & (addr >> 24); - ip_addr[14] = 0xff & (addr >> 16); - ip_addr[13] = 0xff & (addr >> 8); - ip_addr[12] = 0xff & addr; + memcpy(ip_addr + 12, &addr, 4); } else if (portal->af == AF_INET6) inet_pton(AF_INET6, portal->ip_addr, ip_addr); } -- 2.1.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor