net: ip: Introduce mesh_local address flag
This commit introduces a concept of mesh-local IPv6 addresses. Such addresses should only be used for mesh-local communication, therefore should not be used to communicate with different subnets (i. e. destinations outside the mesh). As `addr_type` field already holds different kind of information (whether address was created automatically/manually) it was not used in this case. Instead a mesh_local flag was added, so that we do not lose information on how address was created. Address with such flag set will only be selected as a source address automatically if the destination address is within the same subnet it belongs to. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
2433956500
commit
83b8abaf8a
3 changed files with 14 additions and 3 deletions
|
@ -75,7 +75,10 @@ struct net_if_addr {
|
|||
/** Is this IP address used or not */
|
||||
u8_t is_used : 1;
|
||||
|
||||
u8_t _unused : 6;
|
||||
/** Is this IP address usage limited to the subnet (mesh) or not */
|
||||
u8_t is_mesh_local : 1;
|
||||
|
||||
u8_t _unused : 5;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue