Repository navigation
Conversation
A plain -i selects all IP versions and leaves FnetTy at 0, but a following -i4 or -i6 treated 0 as unset and narrowed the selection to that version, so "-i -i4" listed no IPv6 files. The comment says sequential -i, -i4 and -i6 combine logically, so keep all versions selected.
Some CI containers have no IPv6 address on lo, so nc cannot bind ::1. Skip like case-20-inet6-socket-endpoint does.
|
Hmm, it contradicts with the docs in the manpage. |
|
One thing worth checking before this goes in: the man page already describes the behaviour this change removes. lsof.8 says that It also shifts a related case: If the new semantics are what the maintainers want, the three doc files should be updated in this PR so they do not contradict the code. Otherwise this is probably a documentation clarification rather than a bug fix. |
|
you're right, i missed that the man page spells this out (-i4/-i6 after -i narrows it), so its intended behavior and not a bug. closing this, thanks for looking! |
-i -i4drops IPv6 files, while-i4 -iand-i4 -i6list both:plain
-ileavesFnetTyat 0 meaning "all versions", but the-i4/-i6code reads 0 as "not set yet" and narrows it. the comment right above says these combine logicaly (-i[46]then-i[64]is the same as-i), so now a following-i4/-i6keeps all versions.added
case-20-inet-version-after-all.bashwith an IPv6 listner. it fails before and passes after,make checkis clean.