[lxc-devel] Networknamespace & Netfilter hooks

Serge Hallyn serge.hallyn at ubuntu.com
Mon Mar 11 17:33:38 UTC 2013


Quoting Fabio Patriarca (fab.patriarca at gmail.com):
> Hello,
> i'm no expert about LXC.
> I would like to use core emulator based on LXC (and namespaces) to emulate
> different machines in a emulated wireless environement.
> Each machine should use a kernel module, that we have developed, called
> UPMT (http://netgroup.uniroma2.it/twiki/bin/view.cgi/Netgroup/UpMT).
> The UPMT module provides tunneling and handover over different
> wireless interfaces.
> 
> The UPMT module creates a netfilter hook (PREROUTING) in order to process
> incoming packets.
> The hook sees only the packets of the basic network namespace (not the
> packet of the core virtual machines namespace).
> My question: is there a way to set the network namespace of a netfilter
> hook?

use setns() to set your netns before inserting the hook.

-serge




More information about the lxc-devel mailing list