LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 02-24-2021, 03:32 AM   #1
BobZscharnagk
LQ Newbie
 
Registered: Feb 2021
Posts: 2

Rep: Reputation: Disabled
NFTables extension querying HTTP response data after TCPHDR(SKB) unexpected


I'm running Debian 5.10.1 with a NFTables extension module. There are two functions in the module. 1) Extract the IP address from a DNS response packet. 2) Look for a valid HTTP response served by my Web server. Both functions are called from a NFTables output rule.

The first function works find but the second is having unexpected results. I get the iphdr from using ip_hdr(skb*) and the data in the iphdr looks good. The data after the iphdr looks good for a tcphdr. However the HTTP data which should be after the tcphdr is not correct.

Dumping skb->data I get this :-

4500047B529A40004006AB930A0B122A
0A0B12100050D98D241EF15862B67970
501801F53CBD00000000010000000100
00000000000000000000000000000000
01000000000000000200010000000000
000000000000000000E250C069BBFFFF
5304000000000000035D864C5BE58F5C
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000

The first 0x14 bytes are the iphdr and the next 0x14 bytes the tcphdr and validated in the tcpdump of the packet. However at 0x28 I would expect to see "HTTP/1.1 200 OK....." and I don't.

Any suggestions?
 
Old 02-25-2021, 12:58 PM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Quote:
Originally Posted by BobZscharnagk View Post
I'm running Debian 5.10.1
There's no Debian 5.10.1. There's Debian 5.0.10 released in March 2012. Then there's Debian 10.1 released in September 2019. So which one are you running? Although any of them would seem strange: 5.0.10 is ancient and unsupported, and the current Buster point release is 10.8.

If what you mean is the kernel version, buster has 4.19, while buster-backports, bullseye and sid are currently in sync, all of them having 5.10.13. Have you compiled your kernel yourself?

Last edited by shruggy; 02-25-2021 at 03:29 PM.
 
Old 02-26-2021, 04:51 AM   #3
BobZscharnagk
LQ Newbie
 
Registered: Feb 2021
Posts: 2

Original Poster
Rep: Reputation: Disabled
shruggy,

I'm running a kernel I compiled myself, the source was downloaded from www.kernel.org and at the time 5.10.1 was the latest stable version.

Bob
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
skb data alignment with packet mmap avinashdp Linux - Networking 4 11-09-2018 02:09 PM
Recycle SKB using SKB pool Pankajgoyal38 Linux - Kernel 4 03-11-2013 10:39 PM
Apache response "HTTP request sent; waiting for response" too long ALInux Linux - Server 1 07-19-2011 06:45 PM
tcp_header=(struct tcphdr *)(skbuff->data+(skbuff->nh.iph->ihl*4)); How? iamjayanth Linux - Kernel 4 02-25-2011 04:07 AM
group the outgoing skb's into single skb and then send grouped skb. venkatesh111 Linux - Networking 0 04-27-2006 01:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration