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

Commit 0304ff8a authored by Paolo Galtieri's avatar Paolo Galtieri Committed by David S. Miller
Browse files

[SCTP]: Unmap v4mapped addresses during SCTP_BINDX_REM_ADDR operation.



During the sctp_bindx() call to add additional addresses to the
endpoint, any v4mapped addresses are converted and stored as regular
v4 addresses.  However, when trying to remove these addresses, the
v4mapped addresses are not converted and the operation fails.  This
patch unmaps the addresses on during the remove operation as well.

Signed-off-by: default avatarPaolo Galtieri <pgaltieri@mvista.com>
Signed-off-by: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ea2bc483
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -627,6 +627,12 @@ int sctp_bindx_rem(struct sock *sk, struct sockaddr *addrs, int addrcnt)
			retval = -EINVAL;
			goto err_bindx_rem;
		}

		if (!af->addr_valid(sa_addr, sp, NULL)) {
			retval = -EADDRNOTAVAIL;
			goto err_bindx_rem;
		}

		if (sa_addr->v4.sin_port != htons(bp->port)) {
			retval = -EINVAL;
			goto err_bindx_rem;