From 7a1fddfcf6471ad5c7e7a0bb23e1b9e5a08dd572 Mon Sep 17 00:00:00 2001 From: claudio Date: Mon, 21 Apr 2014 17:33:20 +0000 Subject: [PATCH] It does not make sense to specify a port for the initiatoraddr. --- usr.sbin/iscsictl/iscsi.conf.5 | 5 ++--- usr.sbin/iscsictl/parse.y | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/iscsictl/iscsi.conf.5 b/usr.sbin/iscsictl/iscsi.conf.5 index 48b7e92401a..a860354bb23 100644 --- a/usr.sbin/iscsictl/iscsi.conf.5 +++ b/usr.sbin/iscsictl/iscsi.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: iscsi.conf.5,v 1.1 2012/06/26 21:09:44 claudio Exp $ +.\" $OpenBSD: iscsi.conf.5,v 1.2 2014/04/21 17:33:20 claudio Exp $ .\" .\" Copyright (c) 2012 Claudio Jeker .\" Copyright (c) 2003, 2004 Henning Brauer @@ -16,7 +16,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 26 2012 $ +.Dd $Mdocdate: April 21 2014 $ .Dt ISCSI.CONF 5 .Os .Sh NAME @@ -152,7 +152,6 @@ session to a target to enumerate the available volumes. .It Xo .Ic initiatoraddr Ar addr .Op Ic inet Ns | Ns Ic inet6 -.Op Ic port Ar num .Xc When .Xr iscsid 8 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 @@ -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); -- 2.20.1