Re: [PATCH 10/14] tgt: Fix call to getnameinfo() on None Linux systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Or Gerlitz wrote:
> Boaz Harrosh wrote:
>> Systems other then Linux are more picky with the addr length
>> passed to getnameinfo. They expect it to be set from the
>> returned length of the call to getsockname.
>> Also added a couple of dprints in error cases.
> 
> this patch adds return value checking in 2-3 places and does another change
> related to BSD vs Linux - if you can please seperate it to two patches, then
> it may be easier to see/solve the bsd issue.
> 
> Or.

First it would be best if you comment on the patch code where it is relevant.
Second why did you drop email addresses from CC that's not polite.

But to your point. The two places I added return checks is because they
only fail in BSD, in Linux they succeed regardless. So it's related.

The difference between Linux and BSD is that in BSD struct sockaddr
has an sa_len field that gets set by getsockname() but in Linux the
slen is hard-coded and there is no such field in struct sockaddr.

Other then that I added some prints in the error paths, again, because they
might fail only on BSD. I don't see the point of adding the prints in a separate
patch.

Boaz
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux