6lowpan: add 802.15.4 short addr slaac
This patch adds the autoconfiguration if a valid 802.15.4 short address is available for 802.15.4 6LoWPAN interfaces. Cc: David S. Miller <davem@davemloft.net> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Cc: James Morris <jmorris@namei.org> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Cc: Patrick McHardy <kaber@trash.net> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com> Signed-off-by: Alexander Aring <aar@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
8626a0c83b
commit
2ad3ed5919
@@ -254,6 +254,12 @@ static inline bool lowpan_fetch_skb(struct sk_buff *skb, void *data,
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool lowpan_802154_is_valid_src_short_addr(__le16 addr)
|
||||
{
|
||||
/* First bit of addr is multicast, reserved or 802.15.4 specific */
|
||||
return !(addr & cpu_to_le16(0x8000));
|
||||
}
|
||||
|
||||
static inline void lowpan_push_hc_data(u8 **hc_ptr, const void *data,
|
||||
const size_t len)
|
||||
{
|
||||
|
@@ -94,6 +94,9 @@ int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2,
|
||||
void addrconf_join_solict(struct net_device *dev, const struct in6_addr *addr);
|
||||
void addrconf_leave_solict(struct inet6_dev *idev, const struct in6_addr *addr);
|
||||
|
||||
void addrconf_add_linklocal(struct inet6_dev *idev,
|
||||
const struct in6_addr *addr, u32 flags);
|
||||
|
||||
static inline int addrconf_ifid_eui48(u8 *eui, struct net_device *dev)
|
||||
{
|
||||
if (dev->addr_len != ETH_ALEN)
|
||||
|
Reference in New Issue
Block a user