Commit 9e3b71f3436415f917eb569cde792b223cceebc0
Committed by
Marcel Holtmann
1 parent
118a5cf8ae
nl802154: avoid address change while running lowpan
The generation of autoconfigured IPv6 link-local addresses starts with a notification on interface up. To handle autoconfiguration according to RFC 4944 requires pan id and short address to generate an autoconfigured link-local address. This patch will avoid changing of these link-layer address configuration while lowpan interface is up. Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com> Signed-off-by: Alexander Aring <aar@pengutronix.de> Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Showing 1 changed file with 10 additions and 0 deletions Side-by-side Diff
net/ieee802154/nl802154.c
... | ... | @@ -1074,6 +1074,11 @@ |
1074 | 1074 | if (netif_running(dev)) |
1075 | 1075 | return -EBUSY; |
1076 | 1076 | |
1077 | + if (wpan_dev->lowpan_dev) { | |
1078 | + if (netif_running(wpan_dev->lowpan_dev)) | |
1079 | + return -EBUSY; | |
1080 | + } | |
1081 | + | |
1077 | 1082 | /* don't change address fields on monitor */ |
1078 | 1083 | if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR || |
1079 | 1084 | !info->attrs[NL802154_ATTR_PAN_ID]) |
... | ... | @@ -1104,6 +1109,11 @@ |
1104 | 1109 | /* conflict here while tx/rx calls */ |
1105 | 1110 | if (netif_running(dev)) |
1106 | 1111 | return -EBUSY; |
1112 | + | |
1113 | + if (wpan_dev->lowpan_dev) { | |
1114 | + if (netif_running(wpan_dev->lowpan_dev)) | |
1115 | + return -EBUSY; | |
1116 | + } | |
1107 | 1117 | |
1108 | 1118 | /* don't change address fields on monitor */ |
1109 | 1119 | if (wpan_dev->iftype == NL802154_IFTYPE_MONITOR || |