Revision 8b312c1d lib/bdev.py
b/lib/bdev.py | ||
---|---|---|
1301 | 1301 |
# about its peer. |
1302 | 1302 |
cls._SetMinorSyncSpeed(minor, constants.SYNC_SPEED) |
1303 | 1303 |
|
1304 |
if netutils.IsValidIP6(lhost):
|
|
1305 |
if not netutils.IsValidIP6(rhost):
|
|
1304 |
if netutils.IP6Address.IsValid(lhost):
|
|
1305 |
if not netutils.IP6Address.IsValid(rhost):
|
|
1306 | 1306 |
_ThrowError("drbd%d: can't connect ip %s to ip %s" % |
1307 | 1307 |
(minor, lhost, rhost)) |
1308 | 1308 |
family = "ipv6" |
1309 |
elif netutils.IsValidIP4(lhost):
|
|
1310 |
if not netutils.IsValidIP4(rhost):
|
|
1309 |
elif netutils.IP4Address.IsValid(lhost):
|
|
1310 |
if not netutils.IP4Address.IsValid(rhost):
|
|
1311 | 1311 |
_ThrowError("drbd%d: can't connect ip %s to ip %s" % |
1312 | 1312 |
(minor, lhost, rhost)) |
1313 | 1313 |
family = "ipv4" |
Also available in: Unified diff