summaryrefslogtreecommitdiff
path: root/usr.sbin/iscsictl/parse.y
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2014-04-21 17:33:21 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2014-04-21 17:33:21 +0000
commit52253d1cb4f03c64cf76e38e25fea2d431413c63 (patch)
treef1fcf8a2fe0d21c85dace052b9ee4fecf06ee8bd /usr.sbin/iscsictl/parse.y
parent18167fbd693858d2b51ef99dfea8ce5479cfee28 (diff)
It does not make sense to specify a port for the initiatoraddr.
Diffstat (limited to 'usr.sbin/iscsictl/parse.y')
-rw-r--r--usr.sbin/iscsictl/parse.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/iscsictl/parse.y b/usr.sbin/iscsictl/parse.y
index acb84b1eeac..d218a2a6497 100644
--- a/usr.sbin/iscsictl/parse.y
+++ b/usr.sbin/iscsictl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.4 2013/11/25 12:56:09 benno Exp $ */
+/* $OpenBSD: parse.y,v 1.5 2014/04/21 17:33:20 claudio Exp $ */
/*
* Copyright (c) 2010 David Gwynne <dlg@openbsd.org>
@@ -226,6 +226,7 @@ targetoptsl : state { session->disabled = $1; }
freeaddrinfo($2);
}
| INITIATORADDR addrinfo {
+ ((struct sockaddr_in *)$2->ai_addr)->sin_port = 0;
bcopy($2->ai_addr, &session->connection.LocalAddr,
$2->ai_addr->sa_len);
freeaddrinfo($2);