LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-01-2015, 11:58 AM   #1
emanuellima
LQ Newbie
 
Registered: Apr 2015
Posts: 2

Rep: Reputation: Disabled
Lookup to routing table


Hi all,

I am programming in Kernel-space using Netfilter hooks to filter packets from a specific aplication (UDP packets) and i want to make a lookup to the routing table to see if there is a route to this pakets.
My problem is with the fib_lookup funtion that crashs all the system every time i try to use it.
I want to know if anyone knows how to make a lookup to the routing table in Kernel-space?

fib_lookup(struct net *net, const struct flowi4 *flp,struct fib_result *res)

Any tips will help me a lot!!

Thanks in advance!!
 
Old 04-02-2015, 11:09 AM   #2
rahuldevalone
Member
 
Registered: Feb 2007
Location: New Delhi,India
Distribution: RHEL,Cento,Ubuntu,Kali Linux
Posts: 30

Rep: Reputation: 15
Smile

Dear ,
You must be use below commands and sniffers to trace for issue.

1. route -n

2. netstat -aun and netstat -ra

3. tcpdum and wireshark to capture udp packets.see below web link also.

http://www.rationallyparanoid.com/articles/tcpdump.html

Regards,
Rahul Kumar
 
Old 04-10-2015, 04:54 AM   #3
emanuellima
LQ Newbie
 
Registered: Apr 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for the answer but i resolved the problem by calling the fiblookup function out of the hook interruption. I assume that this function cannot be called from an interruption but there is no literature that says that (at least i dint found none yet).

cheers
 
Old 11-25-2020, 01:43 AM   #4
janith98
LQ Newbie
 
Registered: Nov 2020
Posts: 4

Rep: Reputation: Disabled
HI,I have same issue.Can you show me the code of fib_lookup part or full code ? Thank you....
 
Old 11-25-2020, 02:05 AM   #5
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,805

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
You're replying to a 5 year old thread, where the OP is long gone. Best to start your own thread, and reference this one if need be.
 
  


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
[SOLVED] 2wire/AT&T router - LAN DNS table lookup error? royboy626 Linux - Hardware 4 08-27-2015 03:23 PM
[SOLVED] DNS lookup failed - ubuntu server routing between subnets. ReverendTim Linux - Server 1 03-18-2013 06:35 PM
ARP table or routing table consulted first? YaMaHaBoB Linux - Networking 4 07-15-2011 04:56 PM
Logartihm by table lookup spursrule Programming 1 07-22-2006 02:10 PM
route table lookup Kernel API ?? Nalin Gupta Programming 0 07-01-2004 03:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:12 PM.

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