Re: MC 7304 ipv4v6
- From: Bjørn Mork <bjorn mork no>
- To: Thomas Schäfer <tschaefer t-online de>
- Cc: networkmanager-list gnome org, Reinhard Speyerer <rspmn arcor de>
- Subject: Re: MC 7304 ipv4v6
- Date: Mon, 30 Nov 2015 13:23:43 +0100
Bjørn Mork <bjorn mork no> writes:
Probably. I don't know how to do that. Is there an IP family setting
for qmicli? Another alternative is modifying the 802.3 default in
ModemManager. That would be this part of src/mm-port-qmi.c:
if (ctx->set_data_format)
flags |= (QMI_DEVICE_OPEN_FLAGS_NET_802_3 | QMI_DEVICE_OPEN_FLAGS_NET_NO_QOS_HEADER);
Changing it to something like
if (ctx->set_data_format)
flags |= (QMI_DEVICE_OPEN_FLAGS_NET_RAW_IP | QMI_DEVICE_OPEN_FLAGS_NET_NO_QOS_HEADER);
should do for a simple test. I don't think you can use NM to configure
the netdev, though. So you'll have to do that manually after connecting.
I guess it's too late now, but testing this with MM is actually much
easier. I was able to successfully change the mode after MM had opened
the device by using
qmicli -p -d /dev/cdc-wdm1 --device-open-net='net-raw-ip|net-no-qos-header' --get-service-version-info
in aother terminal. This must be done after MM probes and opens the
modem, but before connecting.
(Note: I am testing this on a modem without WDA, which is why I use the
'--device-open-net=' command. Any modem with WDA support should use
'--wda-set-data-format=' instead.)
Did this to test the fix for the missing IPv6 link local address, with
the attached patch.
Yuck, I do now see the major drawback with the random ifid-method: For
some reason I imagined it would create an ifid once and then use it for
all prefixes added. Cannot explain where I got that idea from. The ifid
code is called for every prefix, and if it succeeds then we won't try to
inherit an existing ifid. So the result is different ifids for every
prefix:
nemi:/home/bjorn# ifconfig wwan1
wwan1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.126.247.221 P-t-P:10.126.247.221 Mask:255.255.255.0
inet6 addr: fe80::c277:9246:bac8:195a/64 Scope:Link
inet6 addr: 2a02:2121:81:8d4d:3209:fb71:3275:ce5/64 Scope:Global
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:60 errors:0 dropped:0 overruns:0 frame:0
TX packets:159 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5188 (5.0 KiB) TX bytes:10620 (10.3 KiB)
Bringing the interface down and up again results in two new, unrelated,
ifids:
nemi:/home/bjorn# ifconfig wwan1 down
nemi:/home/bjorn# ifconfig wwan1 up
nemi:/home/bjorn# ifconfig wwan1
wwan1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.126.247.221 P-t-P:10.126.247.221 Mask:255.255.255.0
inet6 addr: 2a02:2121:81:8d4d:7eea:c498:60eb:edee/64 Scope:Global
inet6 addr: fe80::8f0b:4ca6:e22e:7149/64 Scope:Link
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:61 errors:0 dropped:0 overruns:0 frame:0
TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5292 (5.1 KiB) TX bytes:10668 (10.4 KiB)
That's not good... Maybe it's better to let the driver add an address
after all. Unless there is a way to make the addrconf code always
consider inheritance.
Bjørn
From 7776a8161fca6de07d45d3c1bde11836bacde0c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn mork no>
Date: Mon, 30 Nov 2015 11:06:40 +0100
Subject: [RFC] ipv6: use a random ifid for headerless devices
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Generating a random ifid for devices with no L2 header
at all, allowing such devices to take part in IPv6
autoconfiguration. The tuntap driver is one example of
a driver where such an ifid would be useful.
Note that as there is no persistence, new addresses
will be generated every time an interface is brought up:
# ip -6 addr show dev tun0
8: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 state UNKNOWN qlen 500
inet6 fe80::eef2:111c:f270:92ba/64 scope link
valid_lft forever preferred_lft forever
# ip link set tun0 down
# ip link set tun0 up
# ip -6 addr show dev tun0
8: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 state UNKNOWN qlen 500
inet6 fe80::eec0:48d0:6b52:8835/64 scope link
valid_lft forever preferred_lft forever
Signed-off-by: Bjørn Mork <bjorn mork no>
---
net/ipv6/addrconf.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index d84742f003a9..6cf3cae691a5 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -53,6 +53,7 @@
#include <linux/if_arp.h>
#include <linux/if_arcnet.h>
#include <linux/if_infiniband.h>
+#include <linux/random.h>
#include <linux/route.h>
#include <linux/inetdevice.h>
#include <linux/init.h>
@@ -2026,6 +2027,13 @@ static int addrconf_ifid_ip6tnl(u8 *eui, struct net_device *dev)
return 0;
}
+static int addrconf_ifid_random(u8 *eui, struct net_device *dev)
+{
+ get_random_bytes(eui, 8);
+ eui[0] |= 0x02;
+ return 0;
+}
+
static int ipv6_generate_eui64(u8 *eui, struct net_device *dev)
{
switch (dev->type) {
@@ -2047,6 +2055,8 @@ static int ipv6_generate_eui64(u8 *eui, struct net_device *dev)
return addrconf_ifid_ieee1394(eui, dev);
case ARPHRD_TUNNEL6:
return addrconf_ifid_ip6tnl(eui, dev);
+ case ARPHRD_NONE:
+ return addrconf_ifid_random(eui, dev);
}
return -1;
}
@@ -3069,8 +3079,8 @@ static void addrconf_dev_config(struct net_device *dev)
(dev->type != ARPHRD_IEEE802154) &&
(dev->type != ARPHRD_IEEE1394) &&
(dev->type != ARPHRD_TUNNEL6) &&
- (dev->type != ARPHRD_6LOWPAN)) {
- /* Alas, we support only Ethernet autoconfiguration. */
+ (dev->type != ARPHRD_6LOWPAN) &&
+ (dev->type != ARPHRD_NONE)) {
return;
}
--
2.1.4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]