Attach PGT for each PG Portal, set PGT as NULL explicily for not-allo… #47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…wed portals.
According to RFC4171, an entity may have multiple Portals, each Portal
consists of its IP address and port. Besides each PG (portal group)
follows by its own PG IP addresses and TCP/UDP ports.
In order for a Portal to provide access to an iSCSI Node, the PGT
of the PG object MUST be non-NULL. If the PGT value registered for
a specified Portal and iSCSI Node is NULL, or if no PGT value is registered,
then the Portal does not provide access to that iSCSI Node in the Entity.
So PGT is a selector, that controls from which portal iSCSI Node
is allowed to access. The current implementation attachs a default
PGT with value of 0x00000001 at the end of each iSCSI target,
means each iSCSI target is allowed to access from all portals
ignoring np config in iSCSI target.
For example: a host has two interfaces :
eth0:192.168.1.10/255.255.255.0
eth1:10.40.1.20/255.255.255.0
Also has two iSCSI targets:
target 1: iqn.1994-11.com.netgear:nas-e7-5b-4c:0e261f2a:group1, np is set as 192.168.1.10:3260.
target 2: iqn.1994-11.com.netgear:nas-e7-5b-4c:0e261f2a:group1, np is set as 10.40.1.20:3260.
Obviously target 1 is allowed to access from eth0 and target 2 is only from eth1.
While currebt target-isns notifies iSNS server target1 and target 2 can be
accessed from both two interfaces, may cause connection failure.
This change is to attach PGT for each PG Portal, set PGT as NULL explicily
for not-allowed portals.