utils: nfulnl_test: Test nflog_get_packet_hw
Status from this message: Applied, thanks.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | utils: nfulnl_test: Agree with man pagesutils/ | +7 | 1 reply | |
| 2/2 | utils: nfulnl_test: Add rather extensive test of nflog_get_packet_hw()utils/ | +25 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH libnetfilter_log 0/2] utils: nfulnl_test: Test nflog_get_packet_hw
Hi Pablo,
This patchset extends utils/nfulnl_test.c to fully exercise nflog_get_packet_hw(). I made these changes while researching how the doxygen for nflog_get_packet_hw should read.
I was rather surprised to find the hw_addrlen field in struct nfulnl_msg_packet_hw is in Network Byte Order, seeing as how it doesn't come off the wire.
Is this a bug? - it's been that way for at least 5 years (Linux 4.4.14).
I'll document on the basis this is correct behaviour for now.
Cheers ... Duncan.
--------------
Sample output:
Quoted 12 lines
17:30:51#
/home/dunc/tests/netfilter/nfulnl_test/nfulnl_testunbinding existingnf_loghandler forAF_INET(if any)
bindingnfnetlink_logtoAF_INET
binding this socket to group 0
binding this socket to group 100
settingcopy_packetmode
registering callback for group 0
going into main loop
pkt received (len=184)hw_addrlen= 6 (after htons)
HW addr: 00:00:00:00:00:00
hw_protocol=0x86dd hook=1 mark=0 indev=1 prefix="Hi there Tiger" payload_len=52
Quoted 8 lines
pkt received (len=136)
No structnfulnl_msg_packet_hwreturned
hw_protocol=0x86dd hook=3 mark=0 outdev=2 prefix="What's new Pussycat?" payload_len=52 pkt received (len=196)hw_addrlen= 6 (after htons)
HW addr: 18:60:24:bb:02:d6
hw_protocol=0x86dd hook=1 mark=0 indev=2 prefix="Hello World" payload_len=52 ^C
"Hi there Tiger" - locally generated UDP6 for interface lo
"What's new Pussycat?" - locally generated UDP6 for interface eth1
"Hello World" - remotely generated UDP6 on interface eth1
Duncan Roe (2):
utils: nfulnl_test: Agree with man pages
utils: nfulnl_test: Add rather extensive test of nflog_get_packet_hw()
utils/nfulnl_test.c | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-)
Signature · 1 line
2.17.5