Open vulcainman opened 1 year ago
Hi @mafintosh,
First of all, thanks for this great module that saved me a lot of time! Is there any change to merge this pull request?
Best
Can you add a test for it?
Of course, I'll propose something today or early next week.
I've added 2 tests as suggested.
Merging #94 (52a86ce) into master (7b66620) will decrease coverage by
0.01%
. The diff coverage is100.00%
.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
@@ Coverage Diff @@
## master #94 +/- ##
==========================================
- Coverage 97.99% 97.99% -0.01%
==========================================
Files 6 6
Lines 2046 2043 -3
==========================================
- Hits 2005 2002 -3
Misses 41 41
Files | Coverage Δ | |
---|---|---|
index.js | 98.06% <100.00%> (-0.01%) |
:arrow_down: |
Any comment, update?
I don't feel qualified to say whether this is correct, maybe @mafintosh.
The only thing I can say is that it works as expected in our professional project. Basically, it is used to forward and modify on the fly mdns traffic between 2 lans (one modification is to enable qu_bit flag).
This seems like it does the same as https://github.com/mafintosh/dns-packet/pull/96, except that PR uses QU
instead of qu_bit
. I think I would prefer it to be named just qu
.
Any opinion on which PR is better @XiXiangFiles, @vulcainman?
I would say that, for code lint reasons, it would be better to have a lowercased member. Except that point, IMO it doesn't matter since it something like qu, qu_bit qu_flag, bit_qu flag_qu.
Is there any chance to merge ?
This commit fix current QU bit implementation that may be used in mDNS protocol. Indeed, until now, if a packet with QU bit set is received, it is decoded as:
{
...
questions: [ { name: '...', type: 'PTR', class: 'UNKNOWN_32769' }, { name: '...', type: 'PTR', class: 'UNKNOWN_32769' } ],
...
}
Instead of :
{
...
questions: [ { name: '...', type: 'PTR', class: 'IN' }, { name: '...', type: 'PTR', class: 'IN' } ],
...
}
This commit adds a proper QU bit support via the qu_bit field. It enables: