P2P: Add support for cross connection
If enabled, cross connection allows GO to forward IPv4 packets using masquerading NAT from the P2P clients in the group to an uplink WLAN connection. This is disabled by default and can be enabled with "wpa_cli p2p_set cross_connect 1" on the P2P device interface.
This commit is contained in:
parent
6c6915f3db
commit
72044390f3
15 changed files with 289 additions and 5 deletions
|
@ -650,6 +650,21 @@ int p2p_attr_text(struct wpabuf *data, char *buf, char *end)
|
|||
}
|
||||
|
||||
|
||||
int p2p_get_cross_connect_disallowed(const struct wpabuf *p2p_ie)
|
||||
{
|
||||
struct p2p_message msg;
|
||||
|
||||
os_memset(&msg, 0, sizeof(msg));
|
||||
if (p2p_parse_p2p_ie(p2p_ie, &msg))
|
||||
return 0;
|
||||
|
||||
if (!msg.manageability)
|
||||
return 0;
|
||||
|
||||
return !(msg.capability[0] & P2P_MAN_CROSS_CONNECTIION_PERMITTED);
|
||||
}
|
||||
|
||||
|
||||
u8 p2p_get_group_capab(const struct wpabuf *p2p_ie)
|
||||
{
|
||||
struct p2p_message msg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue