From: Santosh Shilimkar Date: Fri, 29 Apr 2016 21:50:55 +0000 (-0700) Subject: RDS: IB: don't use the link-local address for ib transport X-Git-Tag: v4.1.12-92~153^2~4 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5635d8ac4566c91ff5a61deb6d4f418bdc4fa397;p=users%2Fjedix%2Flinux-maple.git RDS: IB: don't use the link-local address for ib transport Link-local address can't be used for IB failover and don't work with IB stack. Even though the DB RDS usage has recommnded to not use these addresses, we keep hitting issue because of accidental usage of it because of missing application config or admin scripts blindly doing rds-ping for each local address(s). RDS TCP which doesn't support acitive active, there might be an usecase so the current fix it limited for IB transport atm. Example traces: $ rds-ping -I 169.254.221.37 169.254.221.38 bind() failed, errno: 99 (Cannot assign requested address) cosnole: RDS/IB: Link local address 169.254.221.37 NOT SUPPORTED RDS: rds_bind() could not find a transport for 169.254.221.37, load rds_tcp or rds_rdma? Orabug: 23027670 Tested-by: Michael Nowak Tested-by: Rose Wang Tested-by: Rafael Alejandro Peralez Acked-by: Mukesh Kacker Reviewed-by: Yuval Shaia Reviewed-by: Wengang Wang Signed-off-by: Santosh Shilimkar --- diff --git a/net/rds/ib.c b/net/rds/ib.c index 26d5302b0c63..19cf1ae6b22e 100644 --- a/net/rds/ib.c +++ b/net/rds/ib.c @@ -430,6 +430,12 @@ static int rds_ib_laddr_check(struct net *net, __be32 addr) struct rdma_cm_id *cm_id; struct sockaddr_in sin; + /* Link-local addresses don't play well with IB */ + if (ipv4_is_linklocal_169(addr)) { + pr_info_ratelimited("RDS/IB: Link local address %pI4 NOT SUPPORTED\n", &addr); + return -EADDRNOTAVAIL; + } + /* Create a CMA ID and try to bind it. This catches both * IB and iWARP capable NICs. */