Skip to content

Commit

Permalink
[SCTP]: Unmap v4mapped addresses during SCTP_BINDX_REM_ADDR operation.
Browse files Browse the repository at this point in the history
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: Paolo Galtieri <pgaltieri@mvista.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Paolo Galtieri authored and David S. Miller committed Apr 17, 2007
1 parent ea2bc48 commit 0304ff8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0304ff8

Please sign in to comment.