linux device driver - How to block packets received by eth0 from going up to TCP/IP stack -
we using dev_add_pack eth_p_all copies of sk_buff of ethernet frames received eth1. there way can prevent eth1 forwarding ethernet frames tcp/ip layer while still letting capture frames , passing on our loadable kernel module?
your best bet create netfilter hook. rather dev_add_pack, gets copy of sk_buff (thereby allowing original sk_buff propagate tcp/ip stack, netfilter hook give pointer original sk_buff traverses stack, , code executes callback stack - can choose block packet, claim ownership in module, or pretty on mind.
Comments
Post a Comment