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

Commit e6f1cebf authored by Al Viro's avatar Al Viro Committed by David S. Miller
Browse files

[NET] endianness noise: INADDR_ANY

parent fc4d30a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -659,7 +659,7 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr)

	socket = SOCKET_I(inode);
	local.sin_family = AF_INET;
	local.sin_addr.s_addr = INADDR_ANY;
	local.sin_addr.s_addr = htonl(INADDR_ANY);

	/* IPPORT_RESERVED = 1024, can't find the definition in the kernel */
	try_port = 1024;
+1 −1
Original line number Diff line number Diff line
@@ -618,7 +618,7 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr)

	socket = SOCKET_I(inode);
	local.sin_family = AF_INET;
	local.sin_addr.s_addr = INADDR_ANY;
	local.sin_addr.s_addr = htonl(INADDR_ANY);

	/* IPPORT_RESERVED = 1024, can't find the definition in the kernel */
	try_port = 1024;
+1 −1
Original line number Diff line number Diff line
@@ -632,7 +632,7 @@ static int nfs_verify_server_address(struct sockaddr *addr)
	switch (addr->sa_family) {
	case AF_INET: {
		struct sockaddr_in *sa = (struct sockaddr_in *)addr;
		return sa->sin_addr.s_addr != INADDR_ANY;
		return sa->sin_addr.s_addr != htonl(INADDR_ANY);
	}
	case AF_INET6: {
		struct in6_addr *sa = &((struct sockaddr_in6 *)addr)->sin6_addr;
+1 −1
Original line number Diff line number Diff line
@@ -458,7 +458,7 @@ int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
	err = -EADDRNOTAVAIL;
	if (!sysctl_ip_nonlocal_bind &&
	    !inet->freebind &&
	    addr->sin_addr.s_addr != INADDR_ANY &&
	    addr->sin_addr.s_addr != htonl(INADDR_ANY) &&
	    chk_addr_ret != RTN_LOCAL &&
	    chk_addr_ret != RTN_MULTICAST &&
	    chk_addr_ret != RTN_BROADCAST)
+1 −1
Original line number Diff line number Diff line
@@ -583,7 +583,7 @@ static int do_ip_setsockopt(struct sock *sk, int level,
		}

		if (!mreq.imr_ifindex) {
			if (mreq.imr_address.s_addr == INADDR_ANY) {
			if (mreq.imr_address.s_addr == htonl(INADDR_ANY)) {
				inet->mc_index = 0;
				inet->mc_addr  = 0;
				err = 0;
Loading