From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless <linux-wireless@vger.kernel.org>
Cc: Netdev <netdev@vger.kernel.org>
Subject: wireless netns work
Date: Thu, 18 Jun 2009 14:35:43 +0200 [thread overview]
Message-ID: <1245328543.13790.31.camel@johannes.local> (raw)
[-- Attachment #1: Type: text/plain, Size: 1987 bytes --]
Hi,
You've all seen the netns patches fly by -- time to explain what I'm
doing maybe?
First, I've not copied all patches to both lists, please look at
http://johannes.sipsolutions.net/patches/kernel/all/LATEST/ for all the
patches with netns in their name, as there are:
## netns work [sent]
006-wext-netns.patch
007-netns-rcu.patch
008-genl-netns.patch
009-mac80211-netns.patch
010-netns-export-get-by-pid.patch
## netns work [rfc]
011-cfg80211-netns.patch
## play together
012-mac80211-allow-netns.patch
## HACK HACK HACK
013-mac80211-no-netdev-dev.patch
Also, to play with it you will need the netns branch of iw, which has
this simple commit:
http://git.sipsolutions.net/gitweb.cgi?p=iw.git;a=commitdiff;h=518d4092312a8b02bdb49163ae403de7abc9bdee
Also grab ns_exec and compile it:
http://johannes.sipsolutions.net/files/ns_exec.c.txt
Now compile your kernel with all the above patches (including the HACK
one) and let's play:
# modprobe mac80211_hsim
open a new terminal, and in it do
# ns_exec -c -n /bin/bash
and note the PID. In the new shell, also do
# ip link set lo up
Then in the old terminal, do
# iw phy#0 set netns PID-from-above
You'll get a sysfs complaint. Now, in the old terminal:
# ip addr add 192.168.12.1/24 dev wlan1
and in the new netns terminal:
# ip addr add 192.168.12.2/24 dev wlan0
Now you can run hostapd on one of them and connect to the other. This
bit works fine. Once the link is established, you _should_ also be able
to ping between the two, but that doesn't work.
Oddly, the link works unidirectionally in both directions, if I ping
from either side tcpdump shows the echo requests on the other side, but
no echo reply is being generated. Still investigating why this is, since
it works fine with veth. Ideas why this is broken would be
appreciated :)
(and to play with veth, do
# ip link add type veth
# ip link set veth0 netns <PID>
# ip addr add ...
)
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next reply other threads:[~2009-06-18 12:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-18 12:35 Johannes Berg [this message]
2009-06-18 12:55 ` wireless netns work Johannes Berg
2009-06-18 17:16 ` Nick Kossifidis
2009-06-18 21:43 ` Luis R. Rodriguez
2009-06-18 21:48 ` Johannes Berg
2009-06-18 22:04 ` Luis R. Rodriguez
2009-06-18 22:06 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1245328543.13790.31.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox