Fix a regression which prevented an IPv6 address in a -b option from
working. PR: 217939 Differential Revision: https://reviews.freebsd.org/D10064
This commit is contained in:
parent
295685c5c1
commit
f7f99edf3f
@ -477,7 +477,15 @@ main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
bflag = 1;
|
bflag = 1;
|
||||||
if ((p = strchr(optarg, ':')) == NULL) {
|
p = strchr(optarg, ']');
|
||||||
|
if (p != NULL)
|
||||||
|
p = strchr(p + 1, ':');
|
||||||
|
else {
|
||||||
|
p = strchr(optarg, ':');
|
||||||
|
if (p != NULL && strchr(p + 1, ':') != NULL)
|
||||||
|
p = NULL; /* backward compatibility */
|
||||||
|
}
|
||||||
|
if (p == NULL) {
|
||||||
/* A hostname or filename only. */
|
/* A hostname or filename only. */
|
||||||
addpeer(&(struct peer){
|
addpeer(&(struct peer){
|
||||||
.pe_name = optarg,
|
.pe_name = optarg,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user