Filtering UDP packets from going up the stack

From: Steve Helding (shelding_at_comcast.net)
Date: 10/29/04


Date: Fri, 29 Oct 2004 02:18:48 GMT

I would like to be able to filter UDP packets from entering my Linux
stack. It's an experiment I'm working on. If anyone knows off the top
of their head how to do this I would appreciate the input. First off, I
know it probably requires rebuilding the kernel. Secondly, based on my
review of the Linux network stack source code it appears that I can
easily determine which packets are UDP but the thing that concerns me is
that it appears I need to free some dynamically created packet buffer
even though I want to throw away the packet. Anyone have any
suggestions or things to look out for?



Relevant Pages

  • Re: Why Linux is blind to this ARP reply ?
    ... I followed every one of your links, I've studied the packets to the ... the router when it is replying to Windows or Linux. ... > running proxy arp and/or filled with static routes? ...
    (comp.os.linux.misc)
  • R: remapping IP addresses for inbound and outbound traffic
    ... I guess you can't do this, since a believe there is a single linux arp table. ... If you had hosts with unique IPs on both nets, that would be another story: you could use some sort of VPN or Bridge functionality. ... You could also be able to avoid packets passing through the bridged/VPNed interfaces thanks to iptables. ... Let one Linux box have two interfaces to IPv4 networks, ...
    (Linux-Kernel)
  • Re: Linux 2.6.9 pktgen module causes INIT process respawning and sickness
    ... >> possible even for Linux. ... >> or even come close to dealing with small packets or full 10 gigabite ... > large packets to DMA. ... overhead of serializing writes to the adapter ring buffer IO memory. ...
    (Linux-Kernel)
  • Re: Linux 2.6.9 pktgen module causes INIT process respawning and sickness
    ... problem with small packet sizes on x86 hardware is related to ... receive data off the card at high enough rates. ... Linux with a Spirent Smartbits, ... into the ring buffer since you are only dealing with 150,000 packets per ...
    (Linux-Kernel)
  • Re: Linux 2.6.9 pktgen module causes INIT process respawning and sickness
    ... problem with small packet sizes on x86 hardware is related to ... receive data off the card at high enough rates. ... Linux with a Spirent Smartbits, ... into the ring buffer since you are only dealing with 150,000 packets per ...
    (Linux-Kernel)